Upgraded actions/checkout to v2 (#3889)

* Revert "Replace actions/checkout with actions/upload/download (#3602)"

This reverts commit 397970e917.

* Upgraded actions/checkout to @v2

Reverts #3602 and Fixes #3881
This commit is contained in:
Alejandro Pedraza 2020-01-08 17:57:36 -05:00 committed by GitHub
parent 63c8c65ec7
commit aa619ed87c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 46 additions and 189 deletions

View File

@ -8,30 +8,28 @@ on:
tags:
- "*"
## Jobs by event type and dependencies:
# Jobs by event type and dependencies:
# Unit tests for every master/tag push and PR:
# Unit tests for every master/tag push and PR
#
# download_src
# -> validate_go_deps
# -> go_unit_tests
# -> go_lint
# -> js_unit_tests
# validate_go_deps
# go_unit_tests
# go_lint
# js_unit_tests
# Docker build and integration tests for every master/tag push and linkerd org PR:
# Docker build and integration tests for every master/tag push and linkerd org PR
#
# download_src
# -> docker_pull
# -> docker_build
# -> kind_setup
# -> kind_integration
# -> kind_cleanup
# docker_pull
# docker_build
# kind_setup
# -> kind_integration
# -> kind_cleanup
# Docker deploy and cloud integration tests for every master/tag push:
# Docker deploy and cloud integration tests for every master/tag push
#
# -> docker_deploy
# -> cloud_integration
# -> cloud_cleanup
# -> docker_deploy
# -> cloud_integration
# -> cloud_cleanup
jobs:
@ -42,18 +40,12 @@ jobs:
# - every PR
#
#
# download_src checks out the source with actions/checkout and then tars
# and uploads the .git directory into the build artifacts storage.
# Every job afterwards downloads that and clones from it to get the source
# again. We only use actions/checkout once because of
# https://github.com/actions/checkout/issues/27
#
download_src:
name: Checkout source
validate_go_deps:
name: Validate go deps
runs-on: ubuntu-18.04
steps:
- name: Checkout code
uses: actions/checkout@v2
# for debugging
- name: Dump env
run: |
@ -66,34 +58,6 @@ jobs:
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Checkout code
uses: actions/checkout@v1
- name: Create .git artifact
run: |
bin/root-tag
tar zcf linkerd2.$GITHUB_SHA.tar.gz .git/
- name: Upload .git artifact
uses: actions/upload-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: linkerd2.${{ github.sha }}.tar.gz
validate_go_deps:
name: Validate go deps
runs-on: ubuntu-18.04
needs: [download_src]
steps:
# TODO: when github actions adds support for anchors, use it here
# to avoid repeting these two steps on every job
- name: Download .git artifact
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
- name: Validate go deps
run: |
. bin/_tag.sh
@ -104,19 +68,11 @@ jobs:
go_unit_tests:
name: Go unit tests
runs-on: ubuntu-18.04
needs: [download_src]
container:
image: golang:1.13.4
steps:
- name: Download .git artifact
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
- name: Checkout code
uses: actions/checkout@v2
- name: Go unit tests
env:
GITCOOKIE_SH: ${{ secrets.GITCOOKIE_SH }}
@ -128,19 +84,11 @@ jobs:
go_lint:
name: Go lint
runs-on: ubuntu-18.04
needs: [download_src]
container:
image: golang:1.13.4
steps:
- name: Download .git artifact
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
- name: Checkout code
uses: actions/checkout@v2
- name: Go lint
env:
GITCOOKIE_SH: ${{ secrets.GITCOOKIE_SH }}
@ -153,19 +101,11 @@ jobs:
go_fmt:
name: Go Format
runs-on: ubuntu-18.04
needs: [download_src]
container:
image: golang:1.13.4
steps:
- name: Download .git artifact
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
- name: Checkout code
uses: actions/checkout@v2
- name: Format
env:
GITCOOKIE_SH: ${{ secrets.GITCOOKIE_SH }}
@ -176,19 +116,11 @@ jobs:
js_unit_tests:
name: JS unit tests
runs-on: ubuntu-18.04
needs: [download_src]
container:
image: node:10.16.0-stretch
steps:
- name: Download .git artifact
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
- name: Checkout code
uses: actions/checkout@v2
- name: Yarn setup
run: |
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.21.1 --network-concurrency 1
@ -209,19 +141,10 @@ jobs:
docker_pull:
name: Docker pull
runs-on: ubuntu-18.04
needs: [download_src]
steps:
- name: Download .git artifact
- name: Checkout code
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
uses: actions/checkout@v2
- name: Docker SSH setup
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
run: |
@ -242,19 +165,10 @@ jobs:
docker_build:
name: Docker build
runs-on: ubuntu-18.04
needs: [download_src]
steps:
- name: Download .git artifact
- name: Checkout code
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
uses: actions/checkout@v2
- name: Docker SSH setup
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
run: |
@ -279,19 +193,10 @@ jobs:
integration_test: [deep, upgrade, helm, custom_domain, external_issuer]
name: Cluster setup (${{ matrix.integration_test }})
runs-on: ubuntu-18.04
needs: [download_src]
steps:
- name: Download .git artifact
- name: Checkout code
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
uses: actions/checkout@v2
- name: Docker SSH setup
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
run: |
@ -329,17 +234,9 @@ jobs:
name: Integration tests (${{ matrix.integration_test }})
runs-on: ubuntu-18.04
steps:
- name: Download .git artifact
- name: Checkout code
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
uses: actions/checkout@v2
- name: Docker SSH setup
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
run: |
@ -415,17 +312,9 @@ jobs:
name: Cluster cleanup (${{ matrix.integration_test }})
runs-on: ubuntu-18.04
steps:
- name: Download .git artifact
- name: Checkout code
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
uses: actions/checkout@v2
# for debugging
- name: Dump env
run: |
@ -467,17 +356,9 @@ jobs:
runs-on: ubuntu-18.04
needs: [validate_go_deps, go_unit_tests, go_lint, js_unit_tests, kind_integration, kind_cleanup]
steps:
- name: Download .git artifact
- name: Checkout code
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
uses: actions/checkout@v2
- name: Configure gcloud
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
env:
@ -528,17 +409,9 @@ jobs:
runs-on: ubuntu-18.04
needs: [docker_deploy]
steps:
- name: Download .git artifact
- name: Checkout code
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
uses: actions/checkout@v2
- name: Configure gcloud
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
env:
@ -595,17 +468,9 @@ jobs:
runs-on: ubuntu-18.04
needs: [cloud_integration]
steps:
- name: Download .git artifact
- name: Checkout code
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
uses: actions/checkout@v2
- name: Configure gcloud
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
env:
@ -645,17 +510,9 @@ jobs:
runs-on: ubuntu-18.04
needs: [cloud_integration]
steps:
- name: Download .git artifact
- name: Checkout code
if: startsWith(github.ref, 'refs/tags')
uses: actions/download-artifact@v1
with:
name: linkerd2-src-${{ github.sha }}
path: ${{ runner.temp }}
- name: Clone source
if: startsWith(github.ref, 'refs/tags')
run: |
tar -C $RUNNER_TEMP -zxf $RUNNER_TEMP/linkerd2.$GITHUB_SHA.tar.gz
git clone $RUNNER_TEMP/.git $GITHUB_WORKSPACE
uses: actions/checkout@v2
- name: Configure gsutils
if: startsWith(github.ref, 'refs/tags')
env: