From f976059446a401a1668ec5f19ce06acaec2b6066 Mon Sep 17 00:00:00 2001 From: nicholasyang Date: Mon, 4 Nov 2024 12:14:33 +0800 Subject: [PATCH 1/2] Dev: github: add a workflow to build test container image --- .github/workflows/test-container-image.yml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/test-container-image.yml diff --git a/.github/workflows/test-container-image.yml b/.github/workflows/test-container-image.yml new file mode 100644 index 000000000..930b8add7 --- /dev/null +++ b/.github/workflows/test-container-image.yml @@ -0,0 +1,27 @@ +name: test container CI +on: + push: + paths: + - "test_container/**" + pull_request: + paths: + - "test_container/**" +jobs: + build: + #if: github.repository == 'ClusterLabs/crmsh' && github.ref_name == 'master' + runs-on: ubuntu-24.04 + defaults: + run: + working-directory: ./test_container + steps: + - uses: actions/checkout@v4 + - name: build container image + run: podman image build -t haleap:ci . + - name: push container image + if: ${{ github.ref_name == 'master' }} + env: + DOCKER_IO_ACCESS_TOKEN: ${{ secrets.DOCKER_IO_ACCESS_TOKEN }} + run: | + echo "$DOCKER_IO_ACCESS_TOKEN" | podman login --username ${{ vars.DOCKER_IO_USERNAME }} --password-stdin docker.io + podman image tag haleap:ci docker.io/nyang23/haleap:${{ github.ref_name }} + podman image push docker.io/nyang23/haleap:${{ github.ref_name }} From 566a4a2074d657c7ef12c8393f73012e95f62c84 Mon Sep 17 00:00:00 2001 From: nicholasyang Date: Mon, 4 Nov 2024 11:13:51 +0800 Subject: [PATCH 2/2] Dev: test_container: end knet 1.29 staging --- test/run-functional-tests | 2 +- test_container/Dockerfile | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/run-functional-tests b/test/run-functional-tests index c0140a193..79f0bc8e8 100755 --- a/test/run-functional-tests +++ b/test/run-functional-tests @@ -1,5 +1,5 @@ #!/bin/bash -CONTAINER_IMAGE=${CONTAINER_IMAGE:-"docker.io/nyang23/haleap:knet-1.29"} +CONTAINER_IMAGE=${CONTAINER_IMAGE:-"docker.io/nyang23/haleap:master"} PROJECT_PATH=$(dirname $(dirname `realpath $0`)) PROJECT_INSIDE="/opt/crmsh" COROSYNC_CONF="/etc/corosync/corosync.conf" diff --git a/test_container/Dockerfile b/test_container/Dockerfile index d0d4ad6f8..5a70ddebc 100644 --- a/test_container/Dockerfile +++ b/test_container/Dockerfile @@ -3,7 +3,6 @@ MAINTAINER Xin Liang CMD ["/usr/lib/systemd/systemd", "--system"] -RUN zypper ar -fG https://download.opensuse.org/repositories/home:/nicholasyang/openSUSE_Tumbleweed/home:nicholasyang.repo RUN zypper -n install systemd openssh \ firewalld iptables iptables-backend-nft \ make autoconf automake vim which libxslt-tools mailx iproute2 iputils bzip2 tar file glibc-locale-base libopenssl1_1 dos2unix cpio gawk \