Changed python libraries in spec file #739
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
--- # trunk-ignore(checkov) | |
name: CI | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }} | |
jobs: | |
build-fedora: | |
name: build-fedora | |
runs-on: ubuntu-latest | |
container: fedora:39 | |
steps: | |
- name: Install build requisites | |
run: | | |
dnf -y update | |
dnf -y install rpmdevtools rpmlint rsync git | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: rpm_build | |
run: | | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
export "version=$(git describe --tags --dirty)" | |
echo "version=$(git describe --tags --dirty)" >> "$GITHUB_OUTPUT" | |
export "version_rpm=$(git describe --tags --abbrev=0)" | |
echo "version_rpm=$(git describe --tags --abbrev=0)" >> "$GITHUB_OUTPUT" | |
chmod 777 rpm/teapot-rpm.sh | |
rpm/teapot-rpm.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: teapot-${{ steps.rpm_build.outputs.version }}_rpm_fedora | |
path: /github/home/rpmbuild/RPMS/noarch/teapot-*.noarch.rpm | |
outputs: | |
version: ${{ steps.rpm_build.outputs.version }} | |
version_rpm: ${{ steps.rpm_build.outputs.version_rpm }} | |
build-rockylinux: | |
name: build-rockylinux | |
needs: build-fedora | |
runs-on: ubuntu-latest | |
container: rockylinux:9.3 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install build requisites | |
run: | | |
dnf -y update | |
dnf -y install rpmdevtools rpmlint rsync | |
- name: Build rpm | |
run: | | |
export "version_rpm=${{ needs.build-fedora.outputs.version_rpm }}" | |
chmod 777 rpm/teapot-rpm.sh | |
rpm/teapot-rpm.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: teapot-${{ needs.build-fedora.outputs.version }}_rpm_rockylinux | |
path: /github/home/rpmbuild/RPMS/noarch/teapot-*.noarch.rpm | |
build-almalinux: | |
name: build-almalinux | |
needs: build-fedora | |
runs-on: ubuntu-latest | |
container: almalinux:9.4 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install build requisites | |
run: | | |
dnf -y update | |
dnf -y install rpmdevtools rpmlint rsync | |
- name: Build rpm | |
run: | | |
export "version_rpm=${{ needs.build-fedora.outputs.version_rpm }}" | |
echo "version_rpm is $version_rpm" | |
chmod 777 rpm/teapot-rpm.sh | |
rpm/teapot-rpm.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: teapot-${{ needs.build-fedora.outputs.version }}_rpm_almalinux | |
path: /github/home/rpmbuild/RPMS/noarch/teapot-*.noarch.rpm | |
containerization: | |
name: containerization | |
needs: build-fedora | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: teapot-${{ needs.build-fedora.outputs.version }}_rpm_fedora | |
path: /home/runner/work/teapot/teapot/robot | |
- name: Building Teapot docker image | |
env: | |
TOKEN: ${{ secrets.TOKEN }} | |
USERNAME: ${{ secrets.USERNAME }} | |
run: | | |
cd robot | |
docker build . --tag ghcr.io/intertwin-eu/teapot:latest | |
echo "$TOKEN" | docker login ghcr.io -u "$USERNAME" --password-stdin | |
docker push ghcr.io/intertwin-eu/teapot:latest | |
test: | |
name: test | |
needs: [build-fedora, containerization] | |
runs-on: ubuntu-latest | |
container: | |
image: dvrbanec/main:latest | |
services: | |
keycloak: | |
image: dvrbanec/keycloak-dev:1 | |
teapot: | |
image: ghcr.io/intertwin-eu/teapot:latest | |
credentials: | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Test Teapot | |
run: | | |
eval "$(oidc-agent)" | |
oidc-gen --flow password -f keycloak-setup/client_config.json --op-username test-user1 --op-password secret1 --prompt none --pw-file keycloak_setup/pw-file test-user1 | |
oidc-gen --flow password -f keycloak-setup/client_config.json --op-username test-user2 --op-password secret2 --prompt none --pw-file keycloak_setup/pw-file test-user2 | |
robot --outputdir /__w/teapot/teapot/robot/output/ /__w/teapot/teapot/robot/teapot-tests.robot | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: robot-tests | |
path: /__w/teapot/teapot/robot/output | |
generate_report: | |
if: always() | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: robot-tests | |
path: /home/runner/work/teapot/teapot/reports/ | |
- name: Send report to commit | |
uses: joonvena/robotframework-reporter-action@v2.4 | |
with: | |
gh_access_token: ${{ secrets.TOKEN }} |