Created
January 3, 2024 09:57
-
-
Save bejean/fe41743c20bfeb2894e86c49492480e7 to your computer and use it in GitHub Desktop.
Exemple cloudbuild.yaml pour déployer une application conteneurisée dans Cloud Run avec Cloud Build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- name: gcr.io/cloud-builders/docker | |
entrypoint: bash | |
args: | |
- -c | |
- | | |
docker build -t $_AR_HOSTNAME/$PROJECT_ID/$_AR_REPO/$_SERVICE_NAME:$COMMIT_SHA --build-arg READPASSWORD=$$READPASSWORD hdtmdata | |
secretEnv: ['READPASSWORD'] | |
- name: gcr.io/cloud-builders/docker | |
args: | |
- push | |
- '$_AR_HOSTNAME/$PROJECT_ID/$_AR_REPO/$_SERVICE_NAME:$COMMIT_SHA' | |
- name: gcr.io/google.com/cloudsdktool/cloud-sdk | |
args: | |
- run | |
- deploy | |
- $_SERVICE_NAME | |
- '--image' | |
- '$_AR_HOSTNAME/$PROJECT_ID/$_AR_REPO/$_SERVICE_NAME:$COMMIT_SHA' | |
- '--region' | |
- $_DEPLOY_REGION | |
- '--platform' | |
- $_PLATFORM | |
entrypoint: gcloud | |
timeout: 1200s | |
images: | |
- '$_AR_HOSTNAME/$PROJECT_ID/$_AR_REPO/$_SERVICE_NAME:$COMMIT_SHA' | |
availableSecrets: | |
secretManager: | |
- versionName: projects/391204307702/secrets/settings-read/versions/1 | |
env: 'READPASSWORD' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment