use sha for cloudbuild

This commit is contained in:
evanpelle
2024-10-05 12:59:29 -07:00
parent 841271dbd6
commit 3e9080502b
2 changed files with 5 additions and 6 deletions
+4 -5
View File
@@ -1,11 +1,11 @@
steps:
# Build the Docker image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/openfrontio/game-server:$TAG_NAME', '.']
args: ['build', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/openfrontio/game-server:${TAG_NAME}-${SHORT_SHA}', '.']
# Push the image to Artifact Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us-central1-docker.pkg.dev/$PROJECT_ID/openfrontio/game-server:$TAG_NAME']
args: ['push', 'us-central1-docker.pkg.dev/$PROJECT_ID/openfrontio/game-server:${TAG_NAME}-${SHORT_SHA}']
# Update the GCE instance with the new container image
- name: 'gcr.io/cloud-builders/gcloud'
@@ -15,7 +15,7 @@ steps:
- 'update-container'
- '${_INSTANCE_NAME}'
- '--container-image'
- 'us-central1-docker.pkg.dev/$PROJECT_ID/openfrontio/game-server:$TAG_NAME'
- 'us-central1-docker.pkg.dev/$PROJECT_ID/openfrontio/game-server:${TAG_NAME}-${SHORT_SHA}'
- '--zone=us-central1-a'
substitutions:
@@ -26,6 +26,5 @@ options:
substitutionOption: 'ALLOW_LOOSE'
logging: CLOUD_LOGGING_ONLY
images:
- 'us-central1-docker.pkg.dev/$PROJECT_ID/openfrontio/game-server:$TAG_NAME'
- 'us-central1-docker.pkg.dev/$PROJECT_ID/openfrontio/game-server:${TAG_NAME}-${SHORT_SHA}'
+1 -1
View File
@@ -27,7 +27,7 @@
</svg>
</a>
<h1>OpenFront.io</h1>
<h2>(v0.6.3)</h2>
<h2>(v0.6.4)</h2>
<div id="username-container">
<input type="text" id="username" placeholder="Enter your username">
</div>