Skip to content

Nightly on 1.7.8.x #544

Nightly on 1.7.8.x

Nightly on 1.7.8.x #544

# Nightly on GCP for 1.7.8.x (Deprecated if 1.7.8.x is not an active branch)
name: Nightly on 1.7.8.x
on:
workflow_run:
workflows: [ 'Nightly Build' ]
types:
- requested
permissions:
contents: read
jobs:
nightly:
runs-on: ubuntu-latest
name: Nightly
strategy:
matrix:
include:
- branch: 1.7.8.x
instance: release
fail-fast: false
env:
GC_INSTANCE_NAME: ${{ secrets.GC_INSTANCE_NAME }}
GC_PROJECT_ID: ${{ secrets.GC_PROJECT_ID }}
GC_SERVICE_KEY: ${{ secrets.GC_SERVICE_KEY }}
GC_ZONE: ${{ secrets.GC_ZONE }}
GH_BRANCH: ${{ matrix.branch }}
INSTANCE_TYPE: ${{ matrix.instance }}
NIGHTLY_TOKEN: ${{ secrets.NIGHTLY_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.GH_BRANCH }}
- name: Initialize GCloud Service Key
run: echo $GC_SERVICE_KEY > $HOME/gcloud-service-key.json
- uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ env.GC_SERVICE_KEY }}
project_id: ${{ env.GC_PROJECT_ID }}
- name: Stop the instance if started
run: gcloud compute instances stop --zone $GC_ZONE "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}"
- name: Add metadata & Start instance
run: |
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata=NIGHTLY_TOKEN=$NIGHTLY_TOKEN && \
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata=GH_BRANCH=$GH_BRANCH && \
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata-from-file startup-tests-script=tests/UI/scripts/run-nightly-tests.sh && \
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata-from-file startup-reports-script=tests/UI/scripts/run-nightly-reports.sh && \
gcloud compute instances start --zone $GC_ZONE "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}"