kaniko test, log current build config

This commit is contained in:
Shams mosowi
2020-07-02 11:55:39 +08:00
parent 0ee71451a0
commit baf4245776
2 changed files with 12 additions and 3 deletions

View File

@@ -20,12 +20,15 @@ if (serviceAccount) {
});
const db = admin.firestore();
const main = async deployRequestPath => {
await db.doc(deployRequestPath).update({ deployedAt: serverTimestamp() });
const main = async (deployRequestPath: string, currentBuild) => {
await db.doc(deployRequestPath).update({
deployedAt: serverTimestamp(),
currentBuild: currentBuild ?? "",
});
return true;
};
main(process.argv[2])
main(process.argv[2], process.argv[3])
.catch(err => console.log(err))
.then(() => console.log("this will succeed"))
.catch(() => "obligatory catch");

View File

@@ -1,4 +1,9 @@
steps:
- name: "gcr.io/kaniko-project/executor:latest"
args:
- --destination=gcr.io/${_PROJECT_ID}/image
- --cache=true
- --cache-ttl=24h
- name: gcr.io/cloud-builders/gcloud
args:
- kms
@@ -34,6 +39,7 @@ steps:
args:
- "updateStatus"
- "${_REQUEST_DOC_PATH}"
- "${_FUNCTION_CONFIG}"
dir: "cloud_functions/functions"
substitutions: