diff --git a/.github/workflows/cloud_integration.yml b/.github/workflows/cloud_integration.yml deleted file mode 100644 index ba404cbf4..000000000 --- a/.github/workflows/cloud_integration.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: Cloud integration -on: - push: - paths-ignore: - - '*.md' - - '**/*.md' - branches: - - main -env: - GH_ANNOTATION: true - DOCKER_BUILDKIT: 1 -jobs: - docker_build: - runs-on: ubuntu-18.04 - strategy: - matrix: - target: [proxy, controller, web, cni-plugin, debug, cli-bin, grafana] - name: Docker build (${{ matrix.target }}) - steps: - - name: Checkout code - # actions/checkout@v2 - uses: actions/checkout@722adc6 - - name: Set environment variables from scripts - run: | - . bin/_tag.sh - echo ::set-env name=TAG::$(CI_FORCE_CLEAN=1 bin/root-tag) - - . bin/_docker.sh - echo ::set-env name=DOCKER_REGISTRY::$DOCKER_REGISTRY - echo ::set-env name=DOCKER_BUILDKIT_CACHE::${{ runner.temp }}/.buildx-cache - - name: Cache docker layers - # actions/cache@v2.0.0 - uses: actions/cache@b820478 - with: - path: ${{ env.DOCKER_BUILDKIT_CACHE }} - key: ${{ runner.os }}-buildx-${{ matrix.target }}-${{ env.TAG }} - restore-keys: | - ${{ runner.os }}-buildx-${{ matrix.target }}- - - name: Build docker images - env: - DOCKER_TRACE: 1 - run: | - docker buildx create --driver docker-container --use - bin/docker-build-${{ matrix.target }} - - name: Push docker images to registry - run: | - echo "${{ secrets.DOCKER_GHCR_PAT }}" | docker login ghcr.io -u "${{ secrets.DOCKER_GHCR_USERNAME }}" --password-stdin - . bin/_docker.sh - docker_push "${{ matrix.target }}" "$TAG" - docker_retag "${{ matrix.target }}" "$TAG" main - docker_push "${{ matrix.target }}" main - - name: Prune docker layers cache - # changes generate new images while the existing ones don't get removed - # so we manually do that to avoid bloating the cache - run: bin/docker-cache-prune - # todo: Keep in sync with `release.yml` - cloud_integration_tests: - name: Cloud integration tests - runs-on: ubuntu-18.04 - needs: [docker_build] - steps: - - name: Checkout code - # actions/checkout@v2 - uses: actions/checkout@722adc6 - - name: Try to load cached Go modules - # actions/cache@v1.1.2 - uses: actions/cache@70655ec - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Install linkerd CLI - run: | - TAG="$(CI_FORCE_CLEAN=1 bin/root-tag)" - CMD="$PWD/target/release/linkerd2-cli-$TAG-linux-amd64" - bin/docker-pull-binaries $TAG - $CMD version --client - # validate CLI version matches the repo - [[ "$TAG" == "$($CMD version --short --client)" ]] - echo "Installed Linkerd CLI version: $TAG" - echo "::set-env name=CMD::$CMD" - echo "::set-env name=TAG::$TAG" - - name: Create GKE cluster - # linkerd/linkerd2-action-gcloud@v1.0.1 - uses: linkerd/linkerd2-action-gcloud@308c4df - with: - cloud_sdk_service_account_key: ${{ secrets.CLOUD_SDK_SERVICE_ACCOUNT_KEY }} - gcp_project: ${{ secrets.GCP_PROJECT }} - gcp_zone: ${{ secrets.GCP_ZONE }} - preemptible: false - create: true - name: testing-${{ env.TAG }}-${{ github.run_id }} - num_nodes: 2 - - name: Run integration tests - run: bin/tests --skip-kind-create "$CMD" - - name: CNI tests - run: | - export TAG="$($CMD version --client --short)" - go test -cover -race -v -mod=readonly ./cni-plugin/test -integration-tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 83ab22ada..c0d94aed0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,3 @@ -# -# This file is a mostly a concatenation of `kind_integration.yml` and -# `cloud_integration.yml`, specifically for release. - name: Release on: push: @@ -35,8 +31,7 @@ jobs: with: path: ${{ env.DOCKER_BUILDKIT_CACHE }} key: ${{ runner.os }}-buildx-${{ matrix.target }}-${{ env.TAG }} - restore-keys: | - ${{ runner.os }}-buildx-${{ matrix.target }}- + restore-keys: ${{ runner.os }}-buildx-${{ matrix.target }}- - name: Set up Docker Buildx # crazy-max/ghaction-docker-buildx@v3.2.0 uses: crazy-max/ghaction-docker-buildx@552c9de @@ -88,16 +83,14 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + restore-keys: ${{ runner.os }}-go- - name: Download image archives # actions/download-artifact@v1 uses: actions/download-artifact@18f0f59 with: name: image-archives - name: Run CLI Integration tests - run: | - go test --failfast --mod=readonly ".\test\cli" --linkerd=$PWD\image-archives\linkerd-windows.exe --cli-tests -v + run: go test --failfast --mod=readonly ".\test\cli" --linkerd=$PWD\image-archives\linkerd-windows.exe --cli-tests -v kind_integration_tests: strategy: matrix: @@ -137,51 +130,6 @@ jobs: # Validate the CLI version matches the current build tag. [[ "$TAG" == "$($CMD version --short --client)" ]] bin/tests --images --name ${{ matrix.integration_test }} "$CMD" - # todo: Keep in sync with `cloud_integration.yml` - cloud_integration_tests: - name: Cloud integration tests - runs-on: ubuntu-18.04 - needs: [docker_build] - steps: - - name: Checkout code - # actions/checkout@v2 - uses: actions/checkout@722adc6 - - name: Try to load cached Go modules - # actions/cache@v1.1.2 - uses: actions/cache@70655ec - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Install linkerd CLI - run: | - TAG="$(CI_FORCE_CLEAN=1 bin/root-tag)" - CMD="$PWD/target/release/linkerd2-cli-$TAG-linux-amd64" - bin/docker-pull-binaries $TAG - $CMD version --client - # validate CLI version matches the repo - [[ "$TAG" == "$($CMD version --short --client)" ]] - echo "Installed Linkerd CLI version: $TAG" - echo "::set-env name=CMD::$CMD" - echo "::set-env name=TAG::$TAG" - - name: Create GKE cluster - # linkerd/linkerd2-action-gcloud@v1.0.1 - uses: linkerd/linkerd2-action-gcloud@308c4df - with: - cloud_sdk_service_account_key: ${{ secrets.CLOUD_SDK_SERVICE_ACCOUNT_KEY }} - gcp_project: ${{ secrets.GCP_PROJECT }} - gcp_zone: ${{ secrets.GCP_ZONE }} - preemptible: false - create: true - name: testing-${{ env.TAG }}-${{ github.run_id }} - num_nodes: 2 - - name: Run integration tests - run: bin/tests --skip-kind-create "$CMD" - - name: CNI tests - run: | - export TAG="$($CMD version --client --short)" - go test -cover -race -v -mod=readonly ./cni-plugin/test -integration-tests arm64_integration_tests: name: ARM64 integration tests runs-on: ubuntu-18.04 @@ -229,7 +177,7 @@ jobs: # only runs for stable tags. The conditionals are at each step level instead of the job level # otherwise the jobs below that depend on this one won't run name: Pack Chocolatey release - needs: [kind_integration_tests, cloud_integration_tests, arm64_integration_tests] + needs: [kind_integration_tests, arm64_integration_tests] runs-on: windows-2019 steps: - name: Checkout code