From 2be9579ec01051286c10916413e0b02fbf4a131e Mon Sep 17 00:00:00 2001 From: Frank Farzan Date: Fri, 15 May 2020 16:58:14 -0700 Subject: [PATCH] Download kpt in demo functions CD workflow --- .github/workflows/release-demo-functions.yaml | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/.github/workflows/release-demo-functions.yaml b/.github/workflows/release-demo-functions.yaml index e14d931e5..0ed91e023 100644 --- a/.github/workflows/release-demo-functions.yaml +++ b/.github/workflows/release-demo-functions.yaml @@ -12,31 +12,33 @@ jobs: matrix: node-version: [12.x] steps: - - uses: actions/checkout@v1 - - name: Set up gcloud - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master - with: - version: '275.0.0' + - uses: actions/checkout@v1 + - name: Set up gcloud + uses: GoogleCloudPlatform/github-actions/setup-gcloud@master + with: + version: "275.0.0" service_account_email: ${{ secrets.GCP_SA_EMAIL }} service_account_key: ${{ secrets.GCP_SA_KEY }} - - run: gcloud auth configure-docker - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install NPM packages - run: | - cd ts/demo-functions - npm ci - npm test - - name: Build docker images - run: | - cd ts/demo-functions - npm run kpt:docker-build -- --tag=latest - - name: Run all e2e tests - run: | - TAG=latest tests/e2e.sh - - name: Push docker images - run: | - cd ts/demo-functions - npm run kpt:docker-push -- --tag=latest + - run: gcloud auth configure-docker + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install NPM packages + run: | + cd ts/demo-functions + npm ci + npm test + - name: Build docker images + run: | + cd ts/demo-functions + npm run kpt:docker-build -- --tag=latest + - name: Run all e2e tests + run: | + sudo curl https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt -o /usr/local/bin/kpt + sudo chmod +x /usr/local/bin/kpt + TAG=latest tests/e2e.sh + - name: Push docker images + run: | + cd ts/demo-functions + npm run kpt:docker-push -- --tag=latest