From 6690e85e671fca1c201976f49c28ed920b32a013 Mon Sep 17 00:00:00 2001 From: Igor Sudak Date: Wed, 20 Mar 2024 13:49:23 +0100 Subject: [PATCH] Store a stub of node-config/sign_node.yml in the repository (#62) Also, fixed loading an incomplete config file and added more logging. Resolves: AlmaLinux/build-system/issues/236 --- .github/workflows/preflight.yml | 6 +----- .github/workflows/run-tests.yml | 5 ----- .gitignore | 3 --- Dockerfile | 16 ++++++++++++---- almalinux_sign_node.py | 3 ++- docker-compose.yml | 2 +- node-config/sign_node.yml | 6 ++++++ sign_node/config.py | 12 +++++------- sign_node/utils/config.py | 1 + signnode.repo | 4 ++-- 10 files changed, 30 insertions(+), 28 deletions(-) create mode 100644 node-config/sign_node.yml diff --git a/.github/workflows/preflight.yml b/.github/workflows/preflight.yml index d8c32ae..2287095 100644 --- a/.github/workflows/preflight.yml +++ b/.github/workflows/preflight.yml @@ -42,11 +42,6 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - - name: Prepare working directory - run: | - mkdir $REPORTS_DIR node-config - echo "development_mode: yes" > node-config/sign_node.yml - - name: Set up Docker Buildx # https://github.com/marketplace/actions/docker-setup-buildx uses: docker/setup-buildx-action@v3 @@ -62,6 +57,7 @@ jobs: - name: Run Pytest run: | + mkdir $REPORTS_DIR docker compose run --rm sign_node bash -c " pytest -v --cov \ --junit-xml=$REPORTS_DIR/pytest-report.xml \ diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 26e2afa..63dc1a4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,11 +17,6 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - - name: Prepare working directory - run: | - mkdir node-config - echo "development_mode: yes" > node-config/sign_node.yml - - name: Set up Docker Buildx # https://github.com/marketplace/actions/docker-setup-buildx uses: docker/setup-buildx-action@v3 diff --git a/.gitignore b/.gitignore index 1b2cc1b..5b0f1f8 100644 --- a/.gitignore +++ b/.gitignore @@ -132,6 +132,3 @@ dmypy.json .idea/ .vscode/ .DS_Store - -# Misc -node-config/ diff --git a/Dockerfile b/Dockerfile index 9d0435e..34fca1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,20 @@ FROM almalinux:9 COPY signnode.repo /etc/yum.repos.d/signnode.repo -RUN dnf upgrade -y && dnf install -y --enablerepo="buildsystem" \ - rpm-sign pinentry keyrings-filesystem ubu-keyring debian-keyring raspbian-keyring git && \ - dnf clean all +RUN <