Skip to content

Conversation

@bwells-moz
Copy link

No description provided.

Copy link
Contributor

@julienw julienw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If using the gcp-gcr orb, we should use gcr-auth and push-image from that orb directly.

The gcp-cli is probably not needed!

Comment on lines +216 to +222
echo 'export GOOGLE_PROJECT_ID="moz-fx-profiler-prod"' >> "$BASH_ENV"
echo "export OIDC_WIP_ID=$GCPV2_WORKLOAD_IDENTITY_POOL_ID" >> "$BASH_ENV"
echo "export OIDC_WIP_PROVIDER_ID=$GCPV2_CIRCLECI_WORKLOAD_IDENTITY_PROVIDER" >> "$BASH_ENV"
echo "export GOOGLE_PROJECT_NUMBER=$GCPV2_WORKLOAD_IDENTITY_POOL_PROJECT_NUMBER" >> "$BASH_ENV"
echo "export OIDC_SERVICE_ACCOUNT_EMAIL=$GCP_SERVICE_ACCOUNT_EMAIL" >> "$BASH_ENV"
echo 'export GCP_GAR_REPO="profiler-prod"' >> "$BASH_ENV"
echo "export GAR_IMAGE=\"<<parameters.registry-url>>/${GOOGLE_PROJECT_ID}/${GCP_GAR_REPO}/<<parameters.image>>\"" >> $BASH_ENV
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For more simplicity, and if they are needed, I would create these env variables directly in the step below, like we do for IMAGE_VERSION_TAG IMAGE_LATEST_TAG.

For the hardcoded ones, it could be easier to add an environment property to the job or step like described in parts 2 and 3 in https://circleci.com/docs/set-environment-variable/.

Using the commands with $BASH_ENV are useful if:

  • we want some interpolation
  • we want these variables present for all the following steps

But I'm not opposed keeping them here if you prefer, buy only if we need them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants