forked from microsoft/retina
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (61 loc) · 2.32 KB
/
release-validation.yaml
File metadata and controls
70 lines (61 loc) · 2.32 KB
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
name: Release Validation
on:
workflow_run:
workflows: ["Release Retina Charts", "Release Retina Container Images"]
types:
- completed
permissions:
contents: read
jobs:
release_validation:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Release Validation
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get latest tag
id: get_latest_tag
run: |
TAG=$(curl -s https://api.github.com/repos/microsoft/retina/releases | jq -r '.[0].name')
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Test Docker images pull
run: |
TAG=${{ env.TAG }}
images=(
"retina-agent"
"retina-init"
"retina-operator"
"kubectl-retina"
"retina-shell"
)
for image in "${images[@]}"; do
docker pull "ghcr.io/microsoft/retina/$image:$TAG"
done
- name: Test Helm chart pull
run: |
helm pull oci://ghcr.io/microsoft/retina/charts/retina-hubble --version ${{ env.TAG }}
helm pull oci://ghcr.io/microsoft/retina/charts/retina --version ${{ env.TAG }}
- name: Setup kind cluster
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
# krew does not support installing a specific verison
# so if this step fails it means there was something wrong
# with the krew index update as part of the release
- name: Test krew install retina
run: |
(
set -x; cd "$(mktemp -d)" &&
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
KREW="krew-${OS}_${ARCH}" &&
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
tar zxvf "${KREW}.tar.gz" &&
./"${KREW}" install krew
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
kubectl krew install retina
)
- name: Check Go package version
run: |
TAG=${{ env.TAG }}
go list -m "github.com/microsoft/retina@${TAG}"