forked from linkerd/linkerd2
-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (105 loc) · 3.29 KB
/
integration_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Integration tests
on:
pull_request: {}
push:
paths-ignore:
- '*.md'
- '**/*.md'
- 'web/app/package.json'
branches:
- main
permissions:
contents: read
env:
GH_ANNOTATION: true
DOCKER_REGISTRY: ghcr.io/linkerd
jobs:
docker_build:
runs-on: ubuntu-20.04
strategy:
matrix:
component:
- cli-bin
- cni-plugin
- controller
- debug
- jaeger-webhook
- metrics-api
- policy-controller
- proxy
- tap
- web
name: Docker build (${{ matrix.component }})
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- uses: ./.github/actions/docker-build
with:
docker-registry: ${{ env.DOCKER_REGISTRY }}
docker-target: linux-amd64
component: ${{ matrix.component }}
- name: Create artifact with CLI and image archives
env:
ARCHIVES: /home/runner/archives
run: |
mkdir -p $ARCHIVES
docker save "$DOCKER_REGISTRY/${{ matrix.component }}:$TAG" > $ARCHIVES/${{ matrix.component }}.tar
# `with.path` values do not support environment variables yet, so an
# absolute path is used here.
# https://github.com/actions/upload-artifact/issues/8
- name: Upload artifact
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2
with:
name: image-archives
path: /home/runner/archives
integration_tests:
strategy:
matrix:
integration_test:
- cluster-domain
- cni-calico-deep
- deep
- default-policy-deny
- external-issuer
- external-prometheus-deep
- external-resources
- helm-deep
# Skipping Helm upgrade test given chart in 2.11 is backwards-incompatible
#- helm-upgrade
- multicluster
- uninstall
- upgrade-edge
- upgrade-stable
needs: [docker_build]
name: Integration tests (${{ matrix.integration_test }})
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- uses: actions/setup-go@424fc82d43fa5a37540bae62709ddcc23d9520d4
with:
go-version: '1.17'
- name: Set environment variables from scripts
run: |
echo "TAG=$(CI_FORCE_CLEAN=1 bin/root-tag)" >> $GITHUB_ENV
- name: Download image archives
uses: actions/download-artifact@f023be2c48cc18debc3bacd34cb396e0295e2869
with:
name: image-archives
path: image-archives
- name: Load cli-bin image into local docker images
run: docker load < image-archives/cli-bin.tar
- name: Install CLI
run: |
# Copy the CLI out of the local cli-bin container.
container_id=$(docker create "$DOCKER_REGISTRY/cli-bin:$TAG")
docker cp $container_id:/out/linkerd-linux-amd64 "$HOME/.linkerd"
# Validate the CLI version matches the current build tag.
[[ "$TAG" == "$($HOME/.linkerd version --short --client)" ]]
- name: Run integration tests
env:
LINKERD_DOCKER_REGISTRY: ${{ env.DOCKER_REGISTRY }}
run: |
bin/tests --images archive --cleanup-docker --name ${{ matrix.integration_test }} "$HOME/.linkerd"