Skip to content

Commit 7c2b61b

Browse files
committed
ci: pipeline for oci monitor / make Jenkins pull images
1 parent be17f4a commit 7c2b61b

File tree

2 files changed

+53
-23
lines changed

2 files changed

+53
-23
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build OCI monitor docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
id-token: write
10+
11+
jobs:
12+
docker:
13+
runs-on: ubuntu-latest
14+
steps:
15+
-
16+
name: Checkout
17+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
18+
-
19+
name: Login to Stackable Harbor
20+
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
21+
with:
22+
registry: oci.stackable.tech
23+
username: robot$stackable+github-action-build
24+
password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }}
25+
-
26+
name: Set up Cosign
27+
uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 # tag=v3.3.0
28+
-
29+
name: Build and push
30+
id: build-and-push
31+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
32+
with:
33+
context: ./tools/monitor-oci-artifacts
34+
file: ./tools/monitor-oci-artifacts/Dockerfile
35+
push: true
36+
tags: oci.stackable.tech/stackable/monitor-oci-artifacts:0.0.0-dev
37+
build-args: |
38+
REVISION=${{ github.sha }}
39+
VERSION=dev
40+
-
41+
name: Sign the published image
42+
run: cosign sign -y oci.stackable.tech/stackable/monitor-oci-artifacts@${{ steps.build-and-push.outputs.digest }}

apps/jjb/maintenance.j2

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
defaults: global
66
description: ''
77
disabled: false
8-
display-name: 'Docker system prune (nightly)'
8+
display-name: 'Docker system prune (nightly)'
99
concurrent: false
1010
quiet-period: 5
1111
logrotate:
@@ -16,7 +16,7 @@
1616
triggers:
1717
- timed: "H 23 * * *"
1818
builders:
19-
- shell:
19+
- shell:
2020
command: |
2121
docker system prune -f
2222
- job:
@@ -25,7 +25,7 @@
2525
defaults: global
2626
description: ''
2727
disabled: false
28-
display-name: 'Monitor OCI Artifacts (daily)'
28+
display-name: 'Monitor OCI Artifacts (daily)'
2929
concurrent: false
3030
quiet-period: 5
3131
logrotate:
@@ -44,16 +44,12 @@
4444
triggers:
4545
- timed: "H 7 * * *"
4646
builders:
47-
- shell:
47+
- shell:
4848
command: |
49-
cd tools/monitor-oci-artifacts/
50-
docker build . -t docker.stackable.tech/tools/monitor-oci-artifacts:latest
51-
cd ../../
52-
5349
set +x
5450
set +e
5551

56-
docker run --rm docker.stackable.tech/tools/monitor-oci-artifacts:latest > report.txt
52+
docker run --rm oci.stackable.tech/stackable/monitor-oci-artifacts:0.0.0-dev > report.txt
5753
report_exit_code=$?
5854

5955
exit $report_exit_code
@@ -72,7 +68,7 @@
7268
defaults: global
7369
description: ''
7470
disabled: false
75-
display-name: 'Harbor Garbage Collection (daily)'
71+
display-name: 'Harbor Garbage Collection (daily)'
7672
concurrent: false
7773
quiet-period: 5
7874
logrotate:
@@ -96,16 +92,12 @@
9692
credential-id: HARBOR_ROBOT_PASSWORD
9793
variable: HARBOR_ROBOT_PASSWORD
9894
builders:
99-
- shell:
95+
- shell:
10096
command: |
101-
cd tools/harbor-garbage-collector/
102-
docker build . -t docker.stackable.tech/tools/harbor-garbage-collector:latest
103-
cd ../../
104-
10597
set +x
10698
set +e
10799

108-
docker run --rm -e HARBOR_ROBOT_PASSWORD=$HARBOR_ROBOT_PASSWORD docker.stackable.tech/tools/harbor-garbage-collector:latest > report.txt
100+
docker run --rm -e HARBOR_ROBOT_PASSWORD=$HARBOR_ROBOT_PASSWORD oci.stackable.tech/stackable/harbor-garbage-collector:0.0.0-dev > report.txt
109101
report_exit_code=$?
110102

111103
exit $report_exit_code
@@ -124,7 +116,7 @@
124116
defaults: global
125117
description: ''
126118
disabled: false
127-
display-name: 'Nexus Garbage Collection (daily)'
119+
display-name: 'Nexus Garbage Collection (daily)'
128120
concurrent: false
129121
quiet-period: 5
130122
logrotate:
@@ -149,20 +141,16 @@
149141
username: NEXUS_USER
150142
password: NEXUS_PASSWORD
151143
builders:
152-
- shell:
144+
- shell:
153145
command: |
154-
cd tools/nexus-garbage-collector/
155-
docker build . -t docker.stackable.tech/tools/nexus-garbage-collector:latest
156-
cd ../../
157-
158146
set +x
159147
set +e
160148

161149
docker run --rm \
162150
-e NEXUS_USER=$NEXUS_USER \
163151
-e NEXUS_PASSWORD=$NEXUS_PASSWORD \
164152
-e RUST_LOG=info \
165-
docker.stackable.tech/tools/nexus-garbage-collector:latest &> report.txt
153+
oci.stackable.tech/stackable/nexus-garbage-collector:0.0.0-dev &> report.txt
166154
report_exit_code=$?
167155

168156
exit $report_exit_code

0 commit comments

Comments
 (0)