diff --git a/Earthfile b/Earthfile index 9869d96..744bd1b 100644 --- a/Earthfile +++ b/Earthfile @@ -1,3 +1,7 @@ +VERSION 0.8 + +PROJECT earthly-technologies/cloud + FROM golang:1.16-alpine3.13 WORKDIR /go-example @@ -25,4 +29,4 @@ docker: # Demo for Google Cloud Build, showing use of a dedicated service account gcp-cloudbuild: FROM gcr.io/cloud-builders/gsutil - RUN --mount type=secret,id=+secrets/earthly-technologies/google/cloudbuild-service-key,target=/root/key.json gcloud auth activate-service-account --key-file=/root/key.json && gsutil ls -p earthly-jupyterlab + RUN --mount type=secret,id=google/cloudbuild-service-key,target=/root/key.json gcloud auth activate-service-account --key-file=/root/key.json && gsutil ls -p earthly-jupyterlab diff --git a/cloudbuild.yaml b/cloudbuild.yaml index a1c7d9e..a48e54f 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -1,12 +1,29 @@ steps: - id: 'build' - name: 'earthly/earthly:v0.5.24' + name: 'earthly/earthly:v0.8.7' + env: + - "HOME=/root" args: - --allow-privileged + - --ci + # - --push # Uncomment to allow GCP to push images to your choice of repository. Secrets for your repository must be configured. - +docker + - id: 'secrets' + name: 'earthly/earthly:v0.8.7' + env: + - "HOME=/root" + - "EARTHLY_PROJECT=cloud" + args: + - secrets + - ls + secretEnv: + - 'EARTHLY_TOKEN' + - id: 'gcp-test' - name: 'earthly/earthly:v0.5.24' + name: 'earthly/earthly:v0.8.7' + env: + - "HOME=/root" args: - +gcp-cloudbuild secretEnv: @@ -14,5 +31,5 @@ steps: availableSecrets: secretManager: - - versionName: projects/earthly-jupyterlab/secrets/EARTHLY_TOKEN/versions/2 + - versionName: projects/earthly-jupyterlab/secrets/EARTHLY_TOKEN/versions/4 env: 'EARTHLY_TOKEN'