|
| 1 | +steps: |
| 2 | + - name: gcr.io/cloud-builders/docker |
| 3 | + args: |
| 4 | + - build |
| 5 | + - -f |
| 6 | + - src/java/run.Dockerfile |
| 7 | + - -t |
| 8 | + - $_AR_HOSTNAME/$_AR_PROJECT_ID/$_AR_REPOSITORY/$REPO_NAME/java-run:latest |
| 9 | + - src/java |
| 10 | + id: BuildRunImage |
| 11 | + - name: gcr.io/cloud-builders/docker |
| 12 | + args: |
| 13 | + - push |
| 14 | + - $_AR_HOSTNAME/$_AR_PROJECT_ID/$_AR_REPOSITORY/$REPO_NAME/java-run:latest |
| 15 | + id: PushRunImage |
| 16 | + - name: gcr.io/k8s-skaffold/pack |
| 17 | + args: |
| 18 | + - build |
| 19 | + - >- |
| 20 | + $_AR_HOSTNAME/$_AR_PROJECT_ID/$_AR_REPOSITORY/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA |
| 21 | + - '--builder=gcr.io/buildpacks/builder:latest' |
| 22 | + - '--run-image=$_AR_HOSTNAME/$_AR_PROJECT_ID/$_AR_REPOSITORY/$REPO_NAME/java-run:latest' |
| 23 | + - '--network=cloudbuild' |
| 24 | + - '--path=src/java' |
| 25 | + id: Buildpack |
| 26 | + entrypoint: pack |
| 27 | + - name: gcr.io/cloud-builders/docker |
| 28 | + args: |
| 29 | + - push |
| 30 | + - '--all-tags' |
| 31 | + - $_AR_HOSTNAME/$_AR_PROJECT_ID/$_AR_REPOSITORY/$REPO_NAME/$_SERVICE_NAME |
| 32 | + id: Push |
| 33 | + - name: gcr.io/google.com/cloudsdktool/cloud-sdk:slim |
| 34 | + args: |
| 35 | + - run |
| 36 | + - services |
| 37 | + - update |
| 38 | + - $_SERVICE_NAME |
| 39 | + - >- |
| 40 | + --image=$_AR_HOSTNAME/$_AR_PROJECT_ID/$_AR_REPOSITORY/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA |
| 41 | + - >- |
| 42 | + --update-labels=managed-by=gcp-cloud-build-deploy-cloud-run,gcb-trigger-id=$_TRIGGER_ID,gcb-trigger-region=$LOCATION,commit-sha=$COMMIT_SHA,gcb-build-id=$BUILD_ID |
| 43 | + - '--region=$_DEPLOY_REGION' |
| 44 | + - '--quiet' |
| 45 | + id: Deploy |
| 46 | + entrypoint: gcloud |
| 47 | +images: |
| 48 | + - >- |
| 49 | + $_AR_HOSTNAME/$_AR_PROJECT_ID/$_AR_REPOSITORY/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA |
| 50 | +options: |
| 51 | + requestedVerifyOption: VERIFIED |
| 52 | + substitutionOption: ALLOW_LOOSE |
| 53 | + logging: CLOUD_LOGGING_ONLY |
| 54 | +substitutions: |
| 55 | + _AR_REPOSITORY: cloud-run-source-deploy |
| 56 | + _AR_PROJECT_ID: lamp-control-469416 |
| 57 | + _SERVICE_NAME: java-lamp-control-api |
| 58 | + _DEPLOY_REGION: europe-west1 |
| 59 | + _TRIGGER_ID: 8f4a8369-1721-4aab-8be3-0312e689519e |
| 60 | + _AR_HOSTNAME: europe-west1-docker.pkg.dev |
| 61 | +tags: |
| 62 | + - gcp-cloud-build-deploy-cloud-run |
| 63 | + - java-lamp-control-api |
0 commit comments