From 91dd4c87dc365b7044b1755b137edb48a51d3223 Mon Sep 17 00:00:00 2001 From: Tuomo Tanskanen Date: Fri, 17 May 2024 13:45:37 +0300 Subject: [PATCH 1/5] add OWNERS_ALIASES support OWNERS_ALIASES groups are needed for fair blunderbuss review requests. Signed-off-by: Tuomo Tanskanen --- OWNERS | 16 ++++++---------- OWNERS_ALIASES | 12 ++++++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 OWNERS_ALIASES diff --git a/OWNERS b/OWNERS index a99e3ae..0aebf9e 100644 --- a/OWNERS +++ b/OWNERS @@ -1,19 +1,15 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - bfournie - - derekhiggins - - dtantsur - - elfosardo - - iurygregory +- ironic-client-maintainers reviewers: - - zaneb +- ironic-client-maintainers +- ironic-client-reviewers emeritus_reviewers: - - maelk - - stbenjam +- maelk +- stbenjam emeritus_approvers: - - hardys - +- hardys diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES new file mode 100644 index 0000000..66699c9 --- /dev/null +++ b/OWNERS_ALIASES @@ -0,0 +1,12 @@ +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +aliases: + ironic-client-maintainers: + - bfournie + - derekhiggins + - dtantsur + - elfosardo + - iurygregory + + ironic-client-reviewers: + - zaneb From eb84847bb428671b5a4ec2fd6b9381f053f1d751 Mon Sep 17 00:00:00 2001 From: NymanRobin Date: Thu, 16 May 2024 15:18:12 +0300 Subject: [PATCH 2/5] install ironic client with pip in docker build With the sunset of the tripleo-repos project, the docker build started failing. It appears that using pip is now the preferred method for installing the ironic-client for Python instead of using RPM packages. To fix the docker build, switch the build to use pip for installation. Signed-off-by: NymanRobin --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8d35e3d..fa552a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,11 @@ FROM quay.io/centos/centos:stream9 # Help people find the actual baremetal command COPY scripts/openstack /usr/bin/openstack -RUN dnf install -y python3 python3-requests && \ - curl https://raw.githubusercontent.com/openstack/tripleo-repos/master/plugins/module_utils/tripleo_repos/main.py | python3 - -b master current-tripleo && \ - dnf update -y --setopt=install_weak_deps=False && \ - dnf install -y --setopt=install_weak_deps=False python3-ironicclient python3-ironic-inspector-client && \ +RUN dnf install -y python3 python3-pip && \ + pip install python-ironicclient python-ironic-inspector-client --no-cache-dir && \ + chmod +x /usr/bin/openstack && \ + dnf update -y && \ dnf clean all && \ - rm -rf /var/cache/{yum,dnf}/* && \ - chmod +x /usr/bin/openstack + rm -rf /var/cache/{yum,dnf}/* ENTRYPOINT ["/usr/bin/baremetal"] From b63781ae4b6ce9ca02ba2b616666a81e368b7e43 Mon Sep 17 00:00:00 2001 From: NymanRobin Date: Wed, 29 May 2024 09:26:11 +0300 Subject: [PATCH 3/5] Add Slack notification for image build workflow failure Signed-off-by: NymanRobin --- .github/workflows/build-images-action.yml | 36 +++++++++++++++-------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-images-action.yml b/.github/workflows/build-images-action.yml index 7602666..a4c169a 100644 --- a/.github/workflows/build-images-action.yml +++ b/.github/workflows/build-images-action.yml @@ -2,7 +2,7 @@ name: build-images-action on: push: branches: - - 'main' + - 'main' permissions: {} jobs: build: @@ -12,15 +12,25 @@ jobs: permissions: contents: read steps: - - name: build ironic-client image - uses: toptal/jenkins-job-trigger-action@137fff703dd260b52b53d3ba1960396415abc568 # 1.0.2 - with: - jenkins_url: "https://jenkins.nordix.org/" - jenkins_user: "metal3.bot@gmail.com" - jenkins_token: ${{ secrets.JENKINS_TOKEN }} - job_name: "metal3_ironic-client_container_image_building" - job_params: | - { - "BUILD_CONTAINER_IMAGE_GIT_REFERENCE": "${{ github.ref }}" - } - job_timeout: "1000" + - name: build ironic-client image + uses: toptal/jenkins-job-trigger-action@137fff703dd260b52b53d3ba1960396415abc568 # 1.0.2 + with: + jenkins_url: "https://jenkins.nordix.org/" + jenkins_user: "metal3.bot@gmail.com" + jenkins_token: ${{ secrets.JENKINS_TOKEN }} + job_name: "metal3_ironic-client_container_image_building" + job_params: | + { + "BUILD_CONTAINER_IMAGE_GIT_REFERENCE": "${{ github.ref }}" + } + job_timeout: "1000" + - name: Slack Notification on Failure + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@4e5fb42d249be6a45a298f3c9543b111b02f7907 # 2.3.0 + env: + SLACK_TITLE: 'GitHub Action Failed in ${{ github.repository }}' + SLACK_COLOR: '#FF0000' + SLACK_MESSAGE: 'The GitHub Action workflow failed for ironic client image build.' + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: metal3-github-actions-notify + SLACK_USERNAME: metal3-github-actions-notify From 2ebf903c84357f497669835961c8bb2c1ab5e796 Mon Sep 17 00:00:00 2001 From: Tuomo Tanskanen Date: Thu, 30 May 2024 15:28:43 +0300 Subject: [PATCH 4/5] shellcheck only files Make shellcheck consider only files. If branch name ended with .sh or .sh/something, it was found on the filesystem as something ending with .sh, and shellcheck picked it up, and linting failed obviously. Signed-off-by: Tuomo Tanskanen --- hack/shellcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/shellcheck.sh b/hack/shellcheck.sh index 438d215..b0d1f91 100755 --- a/hack/shellcheck.sh +++ b/hack/shellcheck.sh @@ -7,7 +7,7 @@ CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-podman}" if [ "${IS_CONTAINER}" != "false" ]; then TOP_DIR="${1:-.}" - find "${TOP_DIR}" \( -name '*.sh' -o -wholename 'scripts/*' \) -exec shellcheck -s bash {} \+ + find "${TOP_DIR}" \( -name '*.sh' -o -wholename 'scripts/*' \) -type f -exec shellcheck -s bash {} \+ else "${CONTAINER_RUNTIME}" run --rm \ --env IS_CONTAINER=TRUE \ From 9473928305819f84409df7780dff6f689951eb1d Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Tue, 2 Jul 2024 16:33:08 +0200 Subject: [PATCH 5/5] Fix the installation location and drop ironic-inspector After the switch to pip, the binary is installed in /usr/local/bin, while the entrypoint is /usr/bin/baremetal. To ensure better compatibility, tell pip to use /usr as the prefix. Drop ironic-inspector client: it's deprecated, and Metal3 does not need it any more. Signed-off-by: Dmitry Tantsur --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fa552a7..4bcb890 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM quay.io/centos/centos:stream9 COPY scripts/openstack /usr/bin/openstack RUN dnf install -y python3 python3-pip && \ - pip install python-ironicclient python-ironic-inspector-client --no-cache-dir && \ + pip install python-ironicclient --prefix /usr --no-cache-dir && \ chmod +x /usr/bin/openstack && \ dnf update -y && \ dnf clean all && \