-
Notifications
You must be signed in to change notification settings - Fork 238
176 lines (171 loc) · 6.64 KB
/
Copy pathecosystem-tools.yaml
File metadata and controls
176 lines (171 loc) · 6.64 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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: "Ecosystem client tools"
on:
push:
branches:
- main
pull_request:
branches: [main]
release:
types:
- published
permissions: read-all
jobs:
client-tools:
name: Check client tools
runs-on: ubuntu-latest-16-cores
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.23.x
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
go install github.com/swaggo/swag/cmd/swag@v1.16.2
go mod download
sudo apt-get update
sudo apt-get install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config rpm uidmap haproxy jq
# install skopeo
git clone -b v1.12.0 https://github.com/containers/skopeo.git
cd skopeo
make bin/skopeo
sudo cp bin/skopeo /usr/bin
skopeo -v
# install cri-o (for crictl)
OS=xUbuntu_22.04
CRIO_VERSION=1.26
curl -fsSL https://download.opensuse.org/repositories/isv:/kubernetes:/addons:/cri-o:/prerelease:/main:/build/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/cri-o-apt-keyring.gpg
echo "deb [signed-by=/etc/apt/keyrings/cri-o-apt-keyring.gpg] https://download.opensuse.org/repositories/isv:/kubernetes:/addons:/cri-o:/prerelease:/main:/build/deb/ /" | sudo tee /etc/apt/sources.list.d/cri-o.list
sudo apt update
sudo apt install -y cri-o runc
sudo systemctl enable crio.service
sudo systemctl start crio.service
sudo chmod 0777 /var/run/crio/crio.sock
# install docker
# Add Docker's official GPG key:
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# install dex
git clone https://github.com/dexidp/dex.git
cd dex/
git checkout v2.39.1
make bin/dex
./bin/dex serve $GITHUB_WORKSPACE/test/dex/config-dev.yaml &
cd $GITHUB_WORKSPACE
# Prepare for stacker run on Ubuntu 24
sudo ./scripts/enable_userns.sh
- name: Run CI tests
run: |
make run-blackbox-ci
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install localstack
run: |
pip install --upgrade pyopenssl
pip install localstack==3.3.0 awscli-local[ver1] # install LocalStack cli and awslocal
docker pull ghcr.io/project-zot/ci-images/localstack:3.3.0 # Make sure to pull a working version of the image
localstack start -d # Start LocalStack in the background
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
localstack wait -t 30 # to become ready before timing out
echo "Startup complete"
- name: Run cloud-only tests
run: |
make run-blackbox-cloud-ci
env:
AWS_ACCESS_KEY_ID: fake
AWS_SECRET_ACCESS_KEY: fake
# DynamoDB scale-out tests
- name: Run cloud scale-out DynamoDB tests
id: dynamodb_scale
run: |
make run-cloud-scale-out-tests
env:
AWS_ACCESS_KEY_ID: fake
AWS_SECRET_ACCESS_KEY: fake
continue-on-error: true
- name: Print service logs for DynamoDB scale-out
run: |
find /tmp/zot-ft-logs -name '*.log' -print0 | xargs -0 cat
- name: Upload DynamoDB zot logs as build artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: zot-scale-out-dynamodb-logs
path: /tmp/zot-ft-logs
if-no-files-found: error
- name: DynamoDB multi-hop detection
id: dynamodb_multihop
run: |
if find /tmp/zot-ft-logs -name '*.log' -print0 | xargs -0 cat | grep 'cannot proxy an already proxied request'; then
echo "detected multi-hop in DynamoDB tests"
exit 1
else
exit 0
fi
continue-on-error: true
- name: Clean up DynamoDB scale-out logs
run: |
rm -r /tmp/zot-ft-logs
- name: Fail job if DynamoDB error
if: ${{ steps.dynamodb_scale.outcome != 'success' || steps.dynamodb_multihop.outcome != 'success' }}
run: |
echo "DynamoDB scale-out tests failed"
exit 1
# Redis scale-out tests
- name: Run cloud scale-out Redis tests
id: redis_scale
run: |
make run-cloud-scale-out-redis-tests
env:
AWS_ACCESS_KEY_ID: fake
AWS_SECRET_ACCESS_KEY: fake
continue-on-error: true
- name: Print service logs for Redis scale-out
run: |
find /tmp/zot-ft-logs/redis -name '*.log' -print0 | xargs -0 cat
- name: Upload Redis zot logs as build artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: zot-scale-out-redis-logs
path: /tmp/zot-ft-logs
if-no-files-found: ignore
- name: Redis multi-hop detection
id: redis_multihop
run: |
if find /tmp/zot-ft-logs/redis -name '*.log' -print0 | xargs -0 cat | grep 'cannot proxy an already proxied request'; then
echo "detected multi-hop in Redis tests"
exit 1
else
exit 0
fi
continue-on-error: true
- name: Clean up Redis scale-out logs
run: |
rm -rf /tmp/zot-ft-logs/redis
- name: Fail job if Redis error
if: ${{ steps.redis_scale.outcome != 'success' || steps.redis_multihop.outcome != 'success' }}
run: |
echo "Redis scale-out tests failed"
exit 1
- name: Upload zb test results zip as build artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: zb-cloud-scale-out-functional-results-${{ github.sha }}
path: ./zb-results/
- uses: ./.github/actions/teardown-localstack