-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dockerfile for rhel and gl ci config
Signed-off-by: Michal Srb <michal@redhat.com>
- Loading branch information
Showing
2 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
stages: | ||
- buildimage | ||
|
||
variables: | ||
CI_REGISTRY: images.paas.redhat.com | ||
CI_REGISTRY_REPO: osci/rpminspect | ||
|
||
image build: | ||
rules: | ||
- if: $CI_COMMIT_BRANCH == "master" | ||
image: | ||
name: gcr.io/kaniko-project/executor:debug | ||
entrypoint: [""] | ||
stage: buildimage | ||
tags: | ||
- docker | ||
before_script: | ||
- mkdir -p /kaniko/.docker | ||
- cat "$DOCKER_AUTH_CONFIG" > /kaniko/.docker/config.json | ||
script: | ||
- > | ||
/kaniko/executor | ||
--skip-tls-verify | ||
--context $CI_PROJECT_DIR | ||
--dockerfile $CI_PROJECT_DIR/Dockerfile | ||
--destination ${CI_REGISTRY}/${CI_REGISTRY_REPO}:${CI_COMMIT_SHORT_SHA} | ||
--destination ${CI_REGISTRY}/${CI_REGISTRY_REPO}:latest | ||
merge request image build: | ||
rules: | ||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' | ||
image: | ||
name: gcr.io/kaniko-project/executor:debug | ||
entrypoint: [""] | ||
stage: buildimage | ||
tags: | ||
- docker | ||
before_script: | ||
- mkdir -p /kaniko/.docker | ||
- cat "$DOCKER_AUTH_CONFIG" > /kaniko/.docker/config.json | ||
script: | ||
- > | ||
/kaniko/executor | ||
--skip-tls-verify | ||
--context $CI_PROJECT_DIR | ||
--dockerfile $CI_PROJECT_DIR/Dockerfile | ||
--destination ${CI_REGISTRY}/${CI_REGISTRY_REPO}:mr-${CI_MERGE_REQUEST_IID} | ||
--destination ${CI_REGISTRY}/${CI_REGISTRY_REPO}:mr-${CI_MERGE_REQUEST_IID}-${CI_COMMIT_SHORT_SHA} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM images.paas.redhat.com/osci/base-minimal | ||
LABEL maintainer "OSCI" | ||
LABEL description="rpminspect for RHEL" | ||
|
||
# https://copr.fedorainfracloud.org/coprs/dcantrell/rpminspect/ | ||
ENV RPMINSPECT_PACKAGE_NAME=rpminspect | ||
# https://copr.devel.redhat.com/coprs/dcantrell/rpminspect-data-redhat/ | ||
ENV RPMINSPECT_DATA_PACKAGE_NAME=rpminspect-data-redhat | ||
|
||
ENV KOJI_BIN=/usr/bin/brew | ||
ENV RPMINSPECT_CONFIG=/usr/share/rpminspect/redhat.yaml | ||
|
||
# Add repository for "brew" command | ||
RUN cd /etc/yum.repos.d/ && \ | ||
curl -L -O https://download.devel.redhat.com/rel-eng/RCMTOOLS/rcm-tools-rhel-9-baseos.repo | ||
|
||
# Add COPR reposiroty with rpminspect | ||
RUN cd /etc/yum.repos.d/ && \ | ||
curl -L -O https://copr.fedorainfracloud.org/coprs/g/osci/rpminspect/repo/epel-9/group_osci-rpminspect-epel-9.repo | ||
|
||
# Add COPR reposiroty with rpminspect data package | ||
RUN cd /etc/yum.repos.d/ && \ | ||
curl -L -O https://copr.devel.redhat.com/coprs/dcantrell/rpminspect-data-redhat/repo/epel-9/dcantrell-rpminspect-data-redhat-epel-9.repo | ||
|
||
# Add COPR reposiroty with rpminspect data package dependencies | ||
RUN cd /etc/yum.repos.d/ && \ | ||
curl -L -O https://copr.fedorainfracloud.org/coprs/g/osci/rpminspect-data-deps/repo/epel-9/group_osci-rpminspect-data-deps-epel-9.repo | ||
|
||
# Update and install dependencies | ||
RUN dnf -y update &&\ | ||
dnf -y install --enablerepo=rhel-9-buildroot \ | ||
${RPMINSPECT_PACKAGE_NAME} \ | ||
${RPMINSPECT_DATA_PACKAGE_NAME} \ | ||
clamav-update \ | ||
python3-pyyaml \ | ||
python3-click \ | ||
python3-retry \ | ||
python3-GitPython \ | ||
koji \ | ||
git \ | ||
jq \ | ||
brewkoji \ | ||
&& dnf clean all | ||
|
||
RUN freshclam | ||
|
||
COPY *.sh *.py /usr/local/bin/ |