Skip to content

Commit 106e7b3

Browse files
committed
feat(art-cluster): add BuildConfig for rpm-lockfile-prototype image
Add ImageStream, BuildConfig, and ServiceAccount+RoleBinding to build and serve the rpm-lockfile-prototype container image from art-cluster. - Containerfile: Fedora base with python3-dnf, skopeo, RH IT CA certs - BuildConfig outputs to ImageStreamTag rpm-lockfile-prototype:v0.23.0 - ServiceAccount rpm-lockfile-image-puller for Jenkins pull access After deployment, generate a pull token: oc create token rpm-lockfile-image-puller -n art-cd --duration=8760h rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent 2b541ca commit 106e7b3

4 files changed

Lines changed: 68 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: build.openshift.io/v1
2+
kind: BuildConfig
3+
metadata:
4+
labels:
5+
build: rpm-lockfile-prototype
6+
name: rpm-lockfile-prototype
7+
spec:
8+
source:
9+
dockerfile: art-cluster/pipelines/data/project/art-cd/image/Containerfile.rpm_lockfile_prototype
10+
git:
11+
ref: main
12+
uri: https://github.com/openshift-eng/art-tools
13+
type: Git
14+
strategy:
15+
dockerStrategy:
16+
dockerfilePath: art-cluster/pipelines/data/project/art-cd/image/Containerfile.rpm_lockfile_prototype
17+
pullSecret:
18+
name: art-bot-docker-config
19+
type: Docker
20+
output:
21+
to:
22+
kind: ImageStreamTag
23+
name: rpm-lockfile-prototype:v0.23.0
24+
successfulBuildsHistoryLimit: 10
25+
failedBuildsHistoryLimit: 5
26+
runPolicy: Serial
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: image.openshift.io/v1
2+
kind: ImageStream
3+
metadata:
4+
name: rpm-lockfile-prototype
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: rpm-lockfile-image-puller
5+
---
6+
apiVersion: rbac.authorization.k8s.io/v1
7+
kind: RoleBinding
8+
metadata:
9+
name: rpm-lockfile-image-puller-binding
10+
roleRef:
11+
apiGroup: rbac.authorization.k8s.io
12+
kind: ClusterRole
13+
name: system:image-puller
14+
subjects:
15+
- kind: ServiceAccount
16+
name: rpm-lockfile-image-puller
17+
namespace: art-cd
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
ARG BASE_IMAGE=registry.fedoraproject.org/fedora:latest
2+
3+
FROM ${BASE_IMAGE}
4+
RUN dnf install -y python3 python3-pip python3-dnf skopeo rpm git-core && dnf clean all
5+
6+
# Install RH IT CA bundle so DNF can reach internal repos (rhsm-pulp.corp.redhat.com)
7+
RUN curl -sko /etc/pki/ca-trust/source/anchors/2022-IT-Root-CA.pem \
8+
https://certs.corp.redhat.com/certs/2022-IT-Root-CA.pem && \
9+
curl -sko /etc/pki/ca-trust/source/anchors/2015-IT-Root-CA.pem \
10+
https://certs.corp.redhat.com/certs/2015-IT-Root-CA.pem && \
11+
update-ca-trust
12+
13+
WORKDIR /app
14+
15+
ARG GIT_REF=tags/v0.23.0
16+
17+
RUN python3 -m pip install https://github.com/konflux-ci/rpm-lockfile-prototype/archive/refs/${GIT_REF}.tar.gz
18+
19+
WORKDIR /work
20+
21+
ENTRYPOINT ["/usr/local/bin/rpm-lockfile-prototype"]

0 commit comments

Comments
 (0)