-
Notifications
You must be signed in to change notification settings - Fork 285
81 lines (73 loc) · 2.61 KB
/
dockerTests.yml
File metadata and controls
81 lines (73 loc) · 2.61 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
name: Docker Tests
on:
workflow_dispatch:
push:
branches:
- "master"
# Triggers the workflow on PRs to master branch only.
pull_request_target:
types: [labeled]
branches:
- "master"
# Ensures that only the latest commit is running for each PR at a time.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Docker-tests:
name: Docker tests (${{ matrix.os.name }}, containerd-snapshotter=${{ !matrix.disable-containerd-snapshotter }})
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'safe to test')
strategy:
fail-fast: false
matrix:
os:
- name: ubuntu
version: 24.04
disable-containerd-snapshotter: [true, false]
runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }}
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Configure Docker with legacy snapshotter
if: matrix.disable-containerd-snapshotter == true
run: |
sudo bash -c 'cat <<EOF > /etc/docker/daemon.json
{
"insecure-registries": ["localhost:8082"],
"features": {
"containerd-snapshotter": false
}
}
EOF'
sudo systemctl restart docker
- name: Configure Docker with containerd snapshotter
if: matrix.disable-containerd-snapshotter == false
run: |
sudo bash -c 'cat <<EOF > /etc/docker/daemon.json
{
"insecure-registries": ["localhost:8082"]
}
EOF'
sudo systemctl restart docker
- name: Setup FastCI
uses: jfrog-fastci/fastci@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fastci_otel_token: ${{ secrets.FASTCI_TOKEN }}
cache_enabled_optimizations: docker_build_trace_optimization
- name: Setup Go with cache
uses: jfrog/.github/actions/install-go-with-cache@main
- name: Containerize Artifactory
run: |
cd ./testdata/docker/artifactory/
./start.sh
env:
RTLIC: ${{secrets.RTLIC}}
GOPROXY: direct
- name: Wait for Artifactory (Native)
run: |
timeout 600s bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8082)" != "200" ]]; do sleep 5; done'
- name: Run Docker tests
run: go test -v -timeout 0 --test.docker