From 713ca5478c2cbe2a0c9c09a6a829dfc33e265d11 Mon Sep 17 00:00:00 2001 From: Rahul Chauhan Date: Sat, 27 May 2023 00:45:29 +0200 Subject: [PATCH 1/2] github actions workflow for rucio release images - using buildah - supported both rucio version formats --- .github/workflows/rucio-release-images.yml | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/rucio-release-images.yml diff --git a/.github/workflows/rucio-release-images.yml b/.github/workflows/rucio-release-images.yml new file mode 100644 index 00000000..815abb14 --- /dev/null +++ b/.github/workflows/rucio-release-images.yml @@ -0,0 +1,43 @@ +name: Rucio Release Image CI + +on: + push: + tags: + - "release-*.cms*" + +jobs: + buildx: + runs-on: ubuntu-latest + name: Build and Push CMS Rucio Release Images + strategy: + matrix: + image: [rucio-probes, rucio-daemons, rucio-server] + fail-fast: False + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Get git tag name + id: gittag + run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV" + + - name: Get rucio version + id: rucioversion + run: echo "rucio_version=$( echo ${{ env.tag }} | grep -Eo '[0-9]*\.?[0-9]+\.[0-9]+')" >> "$GITHUB_ENV" + + - name: Login to CERN Harbour + uses: redhat-actions/podman-login@v1 + with: + registry: registry.cern.ch + username: ${{ secrets.HARBOR_USERNAME }} + password: ${{ secrets.HARBOR_TOKEN }} + + - name: Build the Docker Image + run: | + cd docker/${{ matrix.image }} && \ + buildah build --build-arg RUCIO_VERSION=${{ env.rucio_version }} --tag registry.cern.ch/${{ vars.HARBOR_REPOSITORY }}/${{ matrix.image }}:${{ env.tag }} . + + - name: Push the Docker Image + run: | + buildah push registry.cern.ch/${{ vars.HARBOR_REPOSITORY }}/${{ matrix.image }}:${{ env.tag }} From b10f99f13231675a9c3e534e3c1d7762400a623a Mon Sep 17 00:00:00 2001 From: Rahul Chauhan Date: Fri, 1 Sep 2023 08:33:13 +0200 Subject: [PATCH 2/2] Use root of directory as docker build context --- .github/workflows/rucio-release-images.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rucio-release-images.yml b/.github/workflows/rucio-release-images.yml index 815abb14..714d7a90 100644 --- a/.github/workflows/rucio-release-images.yml +++ b/.github/workflows/rucio-release-images.yml @@ -11,7 +11,7 @@ jobs: name: Build and Push CMS Rucio Release Images strategy: matrix: - image: [rucio-probes, rucio-daemons, rucio-server] + image: [rucio-probes, rucio-daemons, rucio-server, rucio-ui] fail-fast: False steps: @@ -35,8 +35,7 @@ jobs: - name: Build the Docker Image run: | - cd docker/${{ matrix.image }} && \ - buildah build --build-arg RUCIO_VERSION=${{ env.rucio_version }} --tag registry.cern.ch/${{ vars.HARBOR_REPOSITORY }}/${{ matrix.image }}:${{ env.tag }} . + buildah build --build-arg RUCIO_VERSION=${{ env.rucio_version }} --file docker/${{ matrix.image }}/Dockerfile --tag registry.cern.ch/${{ vars.HARBOR_REPOSITORY }}/${{ matrix.image }}:${{ env.tag }} . - name: Push the Docker Image run: |