Skip to content

Changed in teapot.service from Type=Exec to Type=Simple #838

Changed in teapot.service from Type=Exec to Type=Simple

Changed in teapot.service from Type=Exec to Type=Simple #838

Workflow file for this run

--- # 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 systemd-rpm-macros 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-fedora.sh
rpm/teapot-rpm-fedora.sh
- uses: actions/upload-artifact@v4
with:
name: teapot-${{ steps.rpm_build.outputs.version }}_rpm_fedora_39
path: /github/home/rpmbuild/RPMS/x86_64/teapot-${{ steps.rpm_build.outputs.version_rpm }}*.x86_64.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 systemd-rpm-macros
- name: Build rpm
run: |
export "version_rpm=${{ needs.build-fedora.outputs.version_rpm }}"
chmod 777 rpm/teapot-rpm-rocky.sh
rpm/teapot-rpm-rocky.sh
- uses: actions/upload-artifact@v4
with:
name: teapot-${{ needs.build-fedora.outputs.version }}_rpm_rockylinux_9.3
path: /github/home/rpmbuild/RPMS/x86_64/teapot-${{ steps.rpm_build.outputs.version_rpm }}*.x86_64.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 systemd-rpm-macros
- name: Build rpm
run: |
export "version_rpm=${{ needs.build-fedora.outputs.version_rpm }}"
echo "version_rpm is $version_rpm"
chmod 777 rpm/teapot-rpm-alma.sh
rpm/teapot-rpm-alma.sh
- uses: actions/upload-artifact@v4
with:
name: teapot-${{ needs.build-fedora.outputs.version }}_rpm_almalinux_9.4
path: /github/home/rpmbuild/RPMS/x86_64/teapot-${{ steps.rpm_build.outputs.version_rpm }}*.x86_64.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_39
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/[email protected]
with:
gh_access_token: ${{ secrets.TOKEN }}