Do not run cloud integration tests in CI (#4969)

* Do not run cloud integration tests in CI

Closes #4963

Removed the `./.github/workflows/cloud_integration.yml` workflow, and
removed the `cloud_integration_tests` job from the ``./.github/workflows/release.yml` workflow.
This commit is contained in:
Alejandro Pedraza 2020-09-16 09:36:04 -05:00 committed by GitHub
parent da34b67c56
commit 68582c5f5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 156 deletions

View File

@ -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

View File

@ -1,7 +1,3 @@
#
# This file is a mostly a concatenation of `kind_integration.yml` and
# `cloud_integration.yml`, specifically for release.
name: Release name: Release
on: on:
push: push:
@ -35,8 +31,7 @@ jobs:
with: with:
path: ${{ env.DOCKER_BUILDKIT_CACHE }} path: ${{ env.DOCKER_BUILDKIT_CACHE }}
key: ${{ runner.os }}-buildx-${{ matrix.target }}-${{ env.TAG }} key: ${{ runner.os }}-buildx-${{ matrix.target }}-${{ env.TAG }}
restore-keys: | restore-keys: ${{ runner.os }}-buildx-${{ matrix.target }}-
${{ runner.os }}-buildx-${{ matrix.target }}-
- name: Set up Docker Buildx - name: Set up Docker Buildx
# crazy-max/ghaction-docker-buildx@v3.2.0 # crazy-max/ghaction-docker-buildx@v3.2.0
uses: crazy-max/ghaction-docker-buildx@552c9de uses: crazy-max/ghaction-docker-buildx@552c9de
@ -88,16 +83,14 @@ jobs:
with: with:
path: ~/go/pkg/mod path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: | restore-keys: ${{ runner.os }}-go-
${{ runner.os }}-go-
- name: Download image archives - name: Download image archives
# actions/download-artifact@v1 # actions/download-artifact@v1
uses: actions/download-artifact@18f0f59 uses: actions/download-artifact@18f0f59
with: with:
name: image-archives name: image-archives
- name: Run CLI Integration tests - name: Run CLI Integration tests
run: | run: go test --failfast --mod=readonly ".\test\cli" --linkerd=$PWD\image-archives\linkerd-windows.exe --cli-tests -v
go test --failfast --mod=readonly ".\test\cli" --linkerd=$PWD\image-archives\linkerd-windows.exe --cli-tests -v
kind_integration_tests: kind_integration_tests:
strategy: strategy:
matrix: matrix:
@ -137,51 +130,6 @@ jobs:
# Validate the CLI version matches the current build tag. # Validate the CLI version matches the current build tag.
[[ "$TAG" == "$($CMD version --short --client)" ]] [[ "$TAG" == "$($CMD version --short --client)" ]]
bin/tests --images --name ${{ matrix.integration_test }} "$CMD" 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: arm64_integration_tests:
name: ARM64 integration tests name: ARM64 integration tests
runs-on: ubuntu-18.04 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 # 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 # otherwise the jobs below that depend on this one won't run
name: Pack Chocolatey release 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 runs-on: windows-2019
steps: steps:
- name: Checkout code - name: Checkout code