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
51 changes: 51 additions & 0 deletions gcloud/orb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -483,5 +483,56 @@ jobs:
image: <<parameters.project>>/<<parameters.image>>
registry: <<parameters.registry>>

artifacts-package-publish:
description: >
This job will publish an already built package to a GCP package
repository.
docker:
- image: <<parameters.executor>>
resource_class: <<parameters.resource_class>>
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
executor:
default: python:3.7.10
description: >
Name of the python image to use to execute the job.
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
resource_class:
default: medium
caseydialpad marked this conversation as resolved.
Show resolved Hide resolved
type: string
repository-url:
description: >
URL of GCP package repository to which we will push.
type: string
workspace:
caseydialpad marked this conversation as resolved.
Show resolved Hide resolved
default: '/tmp/build_dir'
description: >
If specified, attaches the specified workspace and copies it into the
image context before building.
type: string
steps:
- run: pip install twine keyring keyrings.google-artifactregistry-auth
caseydialpad marked this conversation as resolved.
Show resolved Hide resolved
caseydialpad marked this conversation as resolved.
Show resolved Hide resolved
- install
- auth:
creds: <<parameters.creds>>
project: <<parameters.project>>
- attach_workspace:
at: <<parameters.workspace>>
- run: twine upload --repository-url <<parameters.repository-url>> <<parameters.workspace>>/<<parameters.path>>/dist/*
caseydialpad marked this conversation as resolved.
Show resolved Hide resolved

orbs:
docker: talkiq/docker@2