Skip to content

Commit

Permalink
Cirrus: Track VM Image calling GCE project
Browse files Browse the repository at this point in the history
With multiple `containers` projects updating VM Image metadata,
it would be very difficult to discover which Cirrus-CI setup
was responsible.  Add the GCE project name to the list
of metadata labels to update when this container runs.  This
will give more context as to which images are currently in use.

Signed-off-by: Chris Evich <[email protected]>
  • Loading branch information
cevich committed Jun 5, 2019
1 parent b1c9cb7 commit 32fb83e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/imgts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ARGS="--update-labels=last-used=$(date +%s)"
# optional
[[ -z "$BUILDID" ]] || ARGS="$ARGS --update-labels=build-id=$BUILDID"
[[ -z "$REPOREF" ]] || ARGS="$ARGS --update-labels=repo-ref=$REPOREF"
[[ -z "$GCPPROJECT" ]] || ARGS="$ARGS --update-labels=project=$GCPPROJECT"

gcloud config set account "$GCPNAME"
gcloud config set project "$GCPPROJECT"
Expand Down

0 comments on commit 32fb83e

Please sign in to comment.