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: steps:
# Build the Docker image # Build the Docker image
- name: 'gcr.io/cloud-builders/docker' - 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 # Push the image to Artifact Registry
- name: 'gcr.io/cloud-builders/docker' - 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 # Update the GCE instance with the new container image
- name: 'gcr.io/cloud-builders/gcloud' - name: 'gcr.io/cloud-builders/gcloud'
@@ -15,7 +15,7 @@ steps:
- 'update-container' - 'update-container'
- '${_INSTANCE_NAME}' - '${_INSTANCE_NAME}'
- '--container-image' - '--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' - '--zone=us-central1-a'
substitutions: substitutions:
@@ -26,6 +26,5 @@ options:
substitutionOption: 'ALLOW_LOOSE' substitutionOption: 'ALLOW_LOOSE'
logging: CLOUD_LOGGING_ONLY logging: CLOUD_LOGGING_ONLY
images: 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> </svg>
</a> </a>
<h1>OpenFront.io</h1> <h1>OpenFront.io</h1>
<h2>(v0.6.3)</h2> <h2>(v0.6.4)</h2>
<div id="username-container"> <div id="username-container">
<input type="text" id="username" placeholder="Enter your username"> <input type="text" id="username" placeholder="Enter your username">
</div> </div>