substitutions:
  _REGION: us-central1
steps:
- name: 'gcr.io/k8s-skaffold/skaffold:v1.24.0'
  entrypoint: 'sh'
  args:
  - -xe
  - -c
  - |
    skaffold build --file-output=/workspace/artifacts.json --default-repo gcr.io/$PROJECT_ID
    skaffold test --build-artifacts=/workspace/artifacts.json
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:debian_component_based'
  entrypoint: 'sh'
  args:
  - -xe
  - -c
  - |
    gcloud config set api_endpoint_overrides/clouddeploy "https://staging-clouddeploy.sandbox.googleapis.com/"
    gcloud alpha deploy apply --file deploy.yaml --region ${_REGION}
    gcloud alpha deploy releases create $SHORT_SHA \
                        --delivery-pipeline web-app \
                        --region ${_REGION} \
                        --build-artifacts /workspace/artifacts.json
artifacts:
  objects:
    location: 'gs://$PROJECT_ID-gceme-artifacts/'
    paths:
    - '/workspace/artifacts.json'
options:
  workerPool: 'projects/vic-e2e-cicd/locations/us-central1/workerPools/default'
timeout: 3600s
substitutions:
  _REGION: us-central1
steps:
- name: 'gcr.io/k8s-skaffold/skaffold:v1.24.0'
  entrypoint: 'sh'
  args:
  - -xe
  - -c
  - |
    skaffold build --file-output=/workspace/artifacts.json --default-repo gcr.io/$PROJECT_ID
    skaffold test --build-artifacts=/workspace/artifacts.json
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:debian_component_based'
  entrypoint: 'sh'
  args:
  - -xe
  - -c
  - |
    gcloud config set api_endpoint_overrides/clouddeploy "https://staging-clouddeploy.sandbox.googleapis.com/"
    gcloud alpha deploy apply --file deploy.yaml --region ${_REGION}
    gcloud alpha deploy releases create $SHORT_SHA-$(date +%s) \
                        --delivery-pipeline web-app \
                        --region ${_REGION} \
                        --build-artifacts /workspace/artifacts.json
artifacts:
  objects:
    location: 'gs://$PROJECT_ID-gceme-artifacts/'
    paths:
    - '/workspace/artifacts.json'
options:
  workerPool: 'projects/vic-e2e-cicd/locations/us-central1/workerPools/default'
timeout: 3600s
Add timestamp to release name
Add timestamp to release name
