-
Notifications
You must be signed in to change notification settings - Fork 55
111 lines (100 loc) · 3.15 KB
/
ci.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
109
110
111
name: pulp-oci-images CI
on:
pull_request:
paths:
- "images/**"
- ".github/**"
- ".ci/**"
env:
COLORTERM: 'yes'
TERM: 'xterm-256color'
PYTEST_ADDOPTS: '--color=yes'
concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Check commit message
env:
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
run: |
echo ::group::REQUESTS
pip install pygithub
echo ::endgroup::
for sha in $(curl $GITHUB_CONTEXT | jq '.[].sha' | sed 's/"//g')
do
python .ci/scripts/validate_commit_message.py $sha
VALUE=$?
if [ "$VALUE" -gt 0 ]; then
exit $VALUE
fi
done
shell: bash
base-images:
runs-on: ubuntu-latest
outputs:
base_cache_key: "${{ steps.build_base_images.outputs.base_cache_key }}"
steps:
- uses: actions/checkout@v4
- name: Build base images
id: build_base_images
uses: "./.github/actions/base_images"
with:
python_version: "3.9"
app-images:
needs: base-images
runs-on: ubuntu-latest
outputs:
app_version: ${{ steps.build_image.outputs.app_version }}
app_branch: ${{ steps.build_image.outputs.app_branch }}
strategy:
fail-fast: false
matrix:
image_name:
- pulp-minimal
- pulp
steps:
- uses: actions/checkout@v4
- name: Build App Image
id: build_image
uses: "./.github/actions/build_image"
with:
image_name: ${{ matrix.image_name }}
image_variant: "stable"
image_cache_key: ${{ needs.base-images.outputs.base_cache_key }}
latest_ui: ${{ github.base_ref == 'latest' }}
built_base_images: ${{ needs.base-images.outputs.rebuilt_images }}
- name: Test App Image
uses: "./.github/actions/test_image"
with:
image_name: ${{ matrix.image_name }}
app_branch: ${{ steps.build_image.outputs.app_branch }}
- name: Logs
if: always()
run: |
set +e
podman ps -a
podman images -a
podman logs pulp
cd images/compose
podman-compose logs
podman logs --tail=10000 compose_pulp_api_1
podman logs --tail=10000 compose_pulp_content_1
podman logs --tail=10000 compose_pulp_worker_1
podman logs --tail=10000 compose_pulp_worker_2
podman logs --tail=10000 compose_pulp_web_1
VOLUME_PATH=$(podman volume inspect pulpdev | jq -r .[].Mountpoint)
sudo ls -al $VOLUME_PATH
sudo tree $VOLUME_PATH
http --follow --timeout 30 --check-status --pretty format --print hb http://localhost:8080/pulp/api/v3/status/ || true