Skip to content
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
24 changes: 24 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and push container images to Quay.io registry
on:
push:
branches:
- master
schedule:
- cron: '0 1 * * 3'

jobs:
build-and-push:
if: github.repository_owner == 'sclorg'
runs-on: ubuntu-latest
steps:
- name: Build and push daily-tests image to quay.io registry
uses: sclorg/build-and-push-action@v4
with:
registry: "quay.io"
registry_namespace: "sclorg"
registry_username: ${{ secrets[QUAY_IMAGE_SCLORG_BUILDER_USERNAME] }}
registry_token: ${{ secrets[QUAY_IMAGE_SCLORG_BUILDER_TOKEN] }}
dockerfile: Dockerfile.daily-tests
tag: "daily-tests:0.1.0"
image_name: "upstream-daily-tests"
quay_application_token: ${{ secrets.QUAY_IMAGE_SCLORG_UPDATE_DESC }}
39 changes: 39 additions & 0 deletions Dockerfile.daily-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM quay.io/fedora/fedora:42

ENV WORK_DIR="/var/tmp" \
VERSION="42" \
RELEASE="0.1.0" \
DOWNSTREAM_TMT_DIR="sclorg-tmt-plans" \
CI_REPO="https://github.com/sclorg/ci-scripts" \
CI_REPO_NAME="ci-scripts" \
UPSTREAM_TMT_REPO="https://github.com/sclorg/sclorg-testing-farm" \
UPSTREAM_TMT_DIR="sclorg-testing-farm" \
HOME="/home/nightly" \
SUMMARY="Daily tests for SCL org projects" \
DESCRIPTION="This image is used to run daily tests for SCL org projects in CI." \
NAME="nightly"

ENV LANG=en_US.UTF-8

LABEL summary="${SUMMARY}" \
description="${DESCRIPTION}" \
io.k8s.description="${DESCRIPTION}" \
io.k8s.display-name="SCL org Daily Tests" \
io.k8s.vendor="SCL org" \
architecture="x86_64"

COPY requirements.sh "${WORK_DIR}/requirements.sh"
RUN bash "${WORK_DIR}/requirements.sh"

RUN dnf install -y python3.13-pip git && \
dnf clean all

RUN git clone "${CI_REPO}" "${CI_REPO_NAME}" && \
git clone "${UPSTREAM_TMT_REPO}" "${WORK_DIR}/${UPSTREAM_TMT_DIR}"

COPY . /ci-scripts
WORKDIR "${HOME}"

USER 500

CMD ["/ci-scripts/run_nightly_tests.sh"]
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ shellcheck:
./run-shellcheck.sh `git ls-files *.sh`

build_images:
podman build -t quay.io/sclorg/daily-tests:latest -f Dockerfile.daily-tests .
podman build -t quay.io/sclorg/daily-reports:latest -f Dockerfile.daily-reports .
podman build -t quay.io/sclorg/upstream-daily-tests:latest -f Dockerfile.daily-tests .
7 changes: 7 additions & 0 deletions requirements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -ex

useradd -u 500 -r -g 0 -m -s /bin/bash -c "Default Application User" "${NAME}"
chown -R 500:0 "${HOME}"
chmod -R a+rwx "${HOME}"