Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gcloud): Support publishing packages to GCP Artifact Registry #47

Merged
merged 7 commits into from
Jun 7, 2021
44 changes: 44 additions & 0 deletions gcloud/orb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,50 @@ commands:
kubectl patch deployment <<parameters.deployment>> \
-p '{"spec":{"template":{"metadata":{"annotations":{"date":"'$(date +'%s')'"}}}}}'

artifacts-package-publish:
description: >
This command will publish an already built package to a GCP package
repository. Command requires python3 to be present.
parameters:
creds:
default: GCLOUD_SERVICE_KEY
description: >
Name of environment variable storing the base64-encoded service key
for the GCP project.
type: env_var_name
files:
default: '*'
description: >
Glob pattern of files to upload
type: string
path:
default: .
description: >
Path to the directory containing your packages.
type: string
project:
description: >
Name of GCP project to which we will push.
type: string
repository-url:
description: >
URL of GCP package repository to which we will push.
type: string
steps:
- run: python3 -m pip install twine keyring keyrings.google-artifactregistry-auth
- install
- auth:
creds: <<parameters.creds>>
project: <<parameters.project>>
- run: |
unset TWINE_PASSWORD
unset TWINE_USERNAME
unset TWINE_REPOSITORY
unset TWINE_REPOSITORY_URL
unset TWINE_CERT
unset TWINE_NON_INTERACTIVE
twine upload --repository-url <<parameters.repository-url>> <<parameters.path>>/<<parameters.files>>

jobs:
deploy-cloud-function:
description: >
Expand Down