diff --git a/.circleci/config.yml b/.circleci/config.yml index 69a6a84..0b43df3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,11 +24,27 @@ jobs: name: Run unit tests command: | make test + + publish: + <<: *defaults + steps: + - run: + name: Login to gcr.io + command: | + gcloud auth activate-service-account --key-file <(echo "$PUSH_TO_GCR_STACKROX_HUB") + gcloud auth list + gcloud --quiet auth configure-docker + - checkout + - run: + name: Build and push image + command: make push workflows: build: jobs: - lint: - context: docker-io-pull + context: gcr-io-stackrox-hub-push - test: - context: docker-io-pull + context: gcr-io-stackrox-hub-push + - publish: + context: gcr-io-stackrox-hub-push