Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dockerfile for rhel and gl ci config #105

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .gitlab-ci.yml
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}
47 changes: 47 additions & 0 deletions Dockerfile.rhel
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/
Loading