From 69056901e03f4dd5029e53b857361663c5127675 Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:03:26 -0400 Subject: [PATCH 1/8] adding a github action to create all irods OS images --- .github/workflows/image-push.yml | 54 ++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/image-push.yml diff --git a/.github/workflows/image-push.yml b/.github/workflows/image-push.yml new file mode 100644 index 0000000..59e736a --- /dev/null +++ b/.github/workflows/image-push.yml @@ -0,0 +1,54 @@ +name: Build and publish the docker image + +# manual trigger event +on: workflow_dispatch + +# working parameters that are specific to this script +env: + REGISTRY: containers.renci.org/irods/ + +# job definition +jobs: + # create a job + Build-and-publish-image: + runs-on: ubuntu-latest + permissions: + contents: read + + # create an array of OS's to build. this is a list of the directories that have a dockerfile + strategy: + matrix: + file_name: + - almalinux-8 + - centos-7 + - debian-11 + - debian-12 + - rockylinux-8 + - rockylinux-9 + - ubuntu-16.04 + - ubuntu-18.04 + - ubuntu-20.04 + - ubuntu-22.04 + + # job steps + steps: + # connect to the renci image registry + - name: Login to containers.renci.org + uses: docker/login-action@v2 + with: + registry: containers.renci.org + username: ${{ secrets.USER }} + password: ${{ secrets.PW }} + + # checkout the codebase + - name: Checkout + uses: actions/checkout@v1 + + # build and push the image. The docker v3 action automatically handles the git checkout. + - name: Build/Push the image to the registry + uses: docker/build-push-action@v3 + with: + context: ./projects/${{ matrix.file_name }} + file: ./projects/${{ matrix.file_name }}/Dockerfile + push: true + tags: ${{ env.REGISTRY }}irods-${{ matrix.file_name }}:latest \ No newline at end of file From a924044c0c7e9282825f7d7e37271bd84796128a Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:07:45 -0400 Subject: [PATCH 2/8] comment update --- .github/workflows/image-push.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/image-push.yml b/.github/workflows/image-push.yml index 59e736a..401d8b7 100644 --- a/.github/workflows/image-push.yml +++ b/.github/workflows/image-push.yml @@ -15,10 +15,10 @@ jobs: permissions: contents: read - # create an array of OS's to build. this is a list of the directories that have a dockerfile + # create an array of operating systems to build. this is a list of the directories that have a dockerfile strategy: matrix: - file_name: + os_name: - almalinux-8 - centos-7 - debian-11 @@ -48,7 +48,7 @@ jobs: - name: Build/Push the image to the registry uses: docker/build-push-action@v3 with: - context: ./projects/${{ matrix.file_name }} - file: ./projects/${{ matrix.file_name }}/Dockerfile + context: ./projects/${{ matrix.os_name }} + file: ./projects/${{ matrix.os_name }}/Dockerfile push: true - tags: ${{ env.REGISTRY }}irods-${{ matrix.file_name }}:latest \ No newline at end of file + tags: ${{ env.REGISTRY }}irods-${{ matrix.os_name }}:latest \ No newline at end of file From 9940dba523888ead6c3dffb348a2a00a70881617 Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:17:26 -0400 Subject: [PATCH 3/8] adding more secrets to the config --- .github/workflows/image-push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-push.yml b/.github/workflows/image-push.yml index 401d8b7..71174dc 100644 --- a/.github/workflows/image-push.yml +++ b/.github/workflows/image-push.yml @@ -36,7 +36,7 @@ jobs: - name: Login to containers.renci.org uses: docker/login-action@v2 with: - registry: containers.renci.org + registry: ${{ secrets.CR_HOST }} username: ${{ secrets.USER }} password: ${{ secrets.PW }} @@ -51,4 +51,4 @@ jobs: context: ./projects/${{ matrix.os_name }} file: ./projects/${{ matrix.os_name }}/Dockerfile push: true - tags: ${{ env.REGISTRY }}irods-${{ matrix.os_name }}:latest \ No newline at end of file + tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}irods-${{ matrix.os_name }}:latest \ No newline at end of file From 56fe242f1de065e078b1e45c6c1c68b9380c1c62 Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:30:02 -0400 Subject: [PATCH 4/8] adjusting the way the container registry location is built up --- .github/workflows/image-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-push.yml b/.github/workflows/image-push.yml index 71174dc..b07c321 100644 --- a/.github/workflows/image-push.yml +++ b/.github/workflows/image-push.yml @@ -51,4 +51,4 @@ jobs: context: ./projects/${{ matrix.os_name }} file: ./projects/${{ matrix.os_name }}/Dockerfile push: true - tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}irods-${{ matrix.os_name }}:latest \ No newline at end of file + tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}${{ matrix.os_name }}:latest \ No newline at end of file From 93db7d068e0051fa7246ca2df0e635501e011db8 Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:36:26 -0400 Subject: [PATCH 5/8] adding cr to the end of the file --- .github/workflows/image-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-push.yml b/.github/workflows/image-push.yml index b07c321..4e7a0b9 100644 --- a/.github/workflows/image-push.yml +++ b/.github/workflows/image-push.yml @@ -51,4 +51,4 @@ jobs: context: ./projects/${{ matrix.os_name }} file: ./projects/${{ matrix.os_name }}/Dockerfile push: true - tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}${{ matrix.os_name }}:latest \ No newline at end of file + tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}${{ matrix.os_name }}:latest From e062a8abbf651dbff47ad17d362bb348e62c5ba2 Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:43:24 -0400 Subject: [PATCH 6/8] removing old ubuntu versions --- .github/workflows/image-push.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/image-push.yml b/.github/workflows/image-push.yml index 4e7a0b9..f8be4f8 100644 --- a/.github/workflows/image-push.yml +++ b/.github/workflows/image-push.yml @@ -25,8 +25,6 @@ jobs: - debian-12 - rockylinux-8 - rockylinux-9 - - ubuntu-16.04 - - ubuntu-18.04 - ubuntu-20.04 - ubuntu-22.04 From dbb4be700340d0a92b573ec05db195936828e19b Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Fri, 20 Oct 2023 16:17:45 -0400 Subject: [PATCH 7/8] removing versions that dont build, adding the building of release images --- .github/workflows/image-push.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/image-push.yml b/.github/workflows/image-push.yml index f8be4f8..338b632 100644 --- a/.github/workflows/image-push.yml +++ b/.github/workflows/image-push.yml @@ -22,11 +22,12 @@ jobs: - almalinux-8 - centos-7 - debian-11 - - debian-12 - rockylinux-8 - - rockylinux-9 - ubuntu-20.04 - - ubuntu-22.04 +# the following os versions do not have a release.Dockerfile that builds properly: +# - debian-12 +# - rockylinux-9 +# - ubuntu-22.04 # job steps steps: @@ -42,11 +43,20 @@ jobs: - name: Checkout uses: actions/checkout@v1 - # build and push the image. The docker v3 action automatically handles the git checkout. - - name: Build/Push the image to the registry + # build and push the development image. The docker v3 action automatically handles the git checkout. + - name: Build/Push the development image to the registry uses: docker/build-push-action@v3 with: context: ./projects/${{ matrix.os_name }} file: ./projects/${{ matrix.os_name }}/Dockerfile push: true tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}${{ matrix.os_name }}:latest + + # build and push the release image. The docker v3 action automatically handles the git checkout. + - name: Build/Push the release image to the registry + uses: docker/build-push-action@v3 + with: + context: ./projects/${{ matrix.os_name }} + file: ./projects/${{ matrix.os_name }}/release.Dockerfile + push: true + tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}${{ matrix.os_name }}.release:latest From 03278879fbe9aebaf0f8ef1b9f414d9ada5dee69 Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Fri, 20 Oct 2023 16:24:14 -0400 Subject: [PATCH 8/8] tidying up --- .github/workflows/image-push.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/image-push.yml b/.github/workflows/image-push.yml index 338b632..725dfaf 100644 --- a/.github/workflows/image-push.yml +++ b/.github/workflows/image-push.yml @@ -43,20 +43,20 @@ jobs: - name: Checkout uses: actions/checkout@v1 - # build and push the development image. The docker v3 action automatically handles the git checkout. + # build and push the development image. - name: Build/Push the development image to the registry uses: docker/build-push-action@v3 with: context: ./projects/${{ matrix.os_name }} file: ./projects/${{ matrix.os_name }}/Dockerfile push: true - tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}${{ matrix.os_name }}:latest + tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}${{ matrix.os_name }}:latest - # build and push the release image. The docker v3 action automatically handles the git checkout. + # build and push the release image. - name: Build/Push the release image to the registry uses: docker/build-push-action@v3 with: context: ./projects/${{ matrix.os_name }} file: ./projects/${{ matrix.os_name }}/release.Dockerfile push: true - tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}${{ matrix.os_name }}.release:latest + tags: ${{ secrets.CR_HOST }}${{ secrets.CR }}${{ matrix.os_name }}.release:latest