From b8153a88f880b066cb8ce69b84764c2d599b30a4 Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Wed, 6 Mar 2024 10:07:51 +0100 Subject: [PATCH 1/9] Add name and change workflow trigger to manual --- .github/workflows/build-containers.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index cd71beb9..b3ba5e80 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -1,7 +1,6 @@ -on: - push: - tags: - - "v*.*.*" +name: Release container images +on: + workflow_dispatch: jobs: build_application_container: From facba9b5917e67e17c2c196cd93e45ab7cb2bd53 Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Wed, 6 Mar 2024 10:17:56 +0100 Subject: [PATCH 2/9] Remove helm chart publish job --- .github/workflows/build-containers.yml | 37 -------------------------- 1 file changed, 37 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index b3ba5e80..360b505a 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -231,40 +231,3 @@ jobs: password: ${{ secrets.DOCKER_HUB_PASSWORD_FLOWFUSE }} readme-filepath: ./helm/file-server/README.md - publish_helm: - needs: [build_application_container, build_nodered_container, build_nodered_container_223, build_file_server_container] - runs-on: ubuntu-latest - steps: - - name: Install Helm - uses: azure/setup-helm@v1 - with: - version: v3.5.2 - - name: Install Deps - run: | - helm repo add bitnami https://charts.bitnami.com/bitnami - - name: Checkout - uses: actions/checkout@v3 - with: - repository: 'flowfuse/helm' - fetch-depth: 0 - path: 'helm' - - name: Package - run: | - helm package -d . helm/helm/flowforge - cd helm - git checkout gh-pages - mv ../flowforge-*.tgz . - helm repo index --url https://flowfuse.github.io/helm . - git add . - git -c user.name='FlowFuse Build Bot' -c user.email='noreply@flowfuse.com' commit -m "Add ${{ github.ref_name }} helm chart" - git push origin - - name: Resync Maintenance - if: ${{ endsWith(github.ref, '.0') }} - run: | - cd helm - git checkout maintenance - git reset --hard origin/main - git push --force origin maintenance - - - From f8661ac1e0c1d3b566cd4d1132897e4e52429003 Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Wed, 6 Mar 2024 10:24:23 +0100 Subject: [PATCH 3/9] Add version input for the release --- .github/workflows/build-containers.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 360b505a..b08884dd 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -1,6 +1,10 @@ name: Release container images on: workflow_dispatch: + inputs: + version: + description: 'Version to release' + required: true jobs: build_application_container: @@ -11,13 +15,13 @@ jobs: repository: 'flowfuse/helm' path: 'helm' # sets options for Docker build - # will tag contianers with GH tag name + # will tag contianers with ${{ github.event.inputs.version }} - name: Docker Meta Data id: meta uses: docker/metadata-action@v4 with: tags: | - type=semver,event=tag,pattern={{version}} + type=semver,event=tag,pattern=${{ github.event.inputs.version }} flavor: | latest=true images: | @@ -71,7 +75,7 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=semver,event=tag,pattern={{version}} + type=semver,event=tag,pattern=${{ github.event.inputs.version }} flavor: | latest=true images: | @@ -121,7 +125,7 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=semver,event=tag,pattern={{version}}-2.2.3 + type=semver,event=tag,pattern=${{ github.event.inputs.version }}-2.2.3 flavor: | latest=false images: | @@ -157,7 +161,7 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=semver,event=tag,pattern={{version}}-3.1.x + type=semver,event=tag,pattern=${{ github.event.inputs.version }}-3.1.x flavor: | latest=false images: | @@ -193,7 +197,7 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=semver,event=tag,pattern={{version}} + type=semver,event=tag,pattern=${{ github.event.inputs.version }} flavor: | latest=true images: | @@ -230,4 +234,3 @@ jobs: username: flowfuse password: ${{ secrets.DOCKER_HUB_PASSWORD_FLOWFUSE }} readme-filepath: ./helm/file-server/README.md - From 6e4d50d3324681a58353d6036aa49892559bbf46 Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Wed, 6 Mar 2024 10:33:02 +0100 Subject: [PATCH 4/9] Temporary changes to allow debugging --- .github/workflows/build-containers.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index b08884dd..cd619a83 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -41,6 +41,7 @@ jobs: password: ${{ secrets.DOCKER_HUB_PASSWORD }} # builds container - name: Build and push FlowForge Application container + if: false uses: docker/build-push-action@v3.2.0 with: context: helm/flowforge-container @@ -49,6 +50,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} push: true - name: Push README + if: false uses: peter-evans/dockerhub-description@v3 with: repository: flowforge/forge-k8s @@ -56,6 +58,7 @@ jobs: password: ${{ secrets.DOCKER_HUB_PASSWORD }} readme-filepath: ./helm/flowforge-container/README.md - name: Push README flowfuse + if: false uses: peter-evans/dockerhub-description@v3 with: repository: flowfuse/forge-k8s @@ -64,6 +67,7 @@ jobs: readme-filepath: ./helm/flowforge-container/README.md build_nodered_container: + if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -114,6 +118,7 @@ jobs: readme-filepath: ./helm/node-red-container/README.md build_nodered_container_223: + if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -150,6 +155,7 @@ jobs: push: true build_nodered_container_31: + if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -186,6 +192,7 @@ jobs: push: true build_file_server_container: + if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 85aa3d0b32bf9a1bbe494f4e8c7f2dc906806645 Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Wed, 6 Mar 2024 11:22:12 +0100 Subject: [PATCH 5/9] Remove tag event from docker metadata step --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index cd619a83..9bf3ae8d 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -21,7 +21,7 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=semver,event=tag,pattern=${{ github.event.inputs.version }} + type=semver,pattern=${{ github.event.inputs.version }} flavor: | latest=true images: | From c0f6563c59b65c46b3d6fe6ed1f40479e4385ddd Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Wed, 6 Mar 2024 11:33:06 +0100 Subject: [PATCH 6/9] Update Docker metadata action configuration --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 9bf3ae8d..608c69ed 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -21,7 +21,7 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=semver,pattern=${{ github.event.inputs.version }} + type=raw,enable=true,priority=200,prefix=,suffix=,value=${{ github.event.inputs.version }} flavor: | latest=true images: | From 394820346aae9184f9f060788a6bbfddddf03a72 Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Wed, 6 Mar 2024 11:38:04 +0100 Subject: [PATCH 7/9] Debug metadata with suffix --- .github/workflows/build-containers.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 608c69ed..d73317b7 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -15,7 +15,7 @@ jobs: repository: 'flowfuse/helm' path: 'helm' # sets options for Docker build - # will tag contianers with ${{ github.event.inputs.version }} + # will tag contianers with ${{ github.event.inputs.version }} and latest - name: Docker Meta Data id: meta uses: docker/metadata-action@v4 @@ -79,7 +79,7 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=semver,event=tag,pattern=${{ github.event.inputs.version }} + type=raw,enable=true,priority=200,prefix=,suffix=,value=${{ github.event.inputs.version }} flavor: | latest=true images: | @@ -118,7 +118,6 @@ jobs: readme-filepath: ./helm/node-red-container/README.md build_nodered_container_223: - if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -130,22 +129,26 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=semver,event=tag,pattern=${{ github.event.inputs.version }}-2.2.3 + type=raw,enable=true,priority=200,prefix=,suffix=-2.2.3,value=${{ github.event.inputs.version }} flavor: | latest=false images: | flowforge/node-red flowfuse/node-red - name: Setup QEMU + if: false uses: docker/setup-qemu-action@v3 - name: Setup Docker buildx + if: false uses: docker/setup-buildx-action@v3 - name: docker login + if: false uses: docker/login-action@v3 with: username: flowforge password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Build and push FlowForge Application container + if: false uses: docker/build-push-action@v3.2.0 with: context: helm/node-red-container From aba8d1d02f45a8c3a6cb47cdd5f0bd20b972fb15 Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Wed, 6 Mar 2024 11:41:05 +0100 Subject: [PATCH 8/9] Debug metadata with suffix --- .github/workflows/build-containers.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index d73317b7..bd8631d2 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -158,7 +158,6 @@ jobs: push: true build_nodered_container_31: - if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -170,22 +169,26 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=semver,event=tag,pattern=${{ github.event.inputs.version }}-3.1.x + type=raw,enable=true,priority=200,prefix=,suffix=-3.1.x,value=${{ github.event.inputs.version }} flavor: | latest=false images: | flowforge/node-red flowfuse/node-red - name: Setup QEMU + if: false uses: docker/setup-qemu-action@v3 - name: Setup Docker buildx + if: false uses: docker/setup-buildx-action@v3 - name: docker login + if: false uses: docker/login-action@v3 with: username: flowforge password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Build and push FlowForge Application container + if: false uses: docker/build-push-action@v3.2.0 with: context: helm/node-red-container @@ -207,7 +210,7 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=semver,event=tag,pattern=${{ github.event.inputs.version }} + type=raw,enable=true,priority=200,prefix=,suffix=,value=${{ github.event.inputs.version }} flavor: | latest=true images: | From 864a171fdc37623be5ae2b64b7c2fcb031737153 Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Wed, 6 Mar 2024 17:57:09 +0100 Subject: [PATCH 9/9] Remove debug-related changes --- .github/workflows/build-containers.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index bd8631d2..6fbad85d 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -41,7 +41,6 @@ jobs: password: ${{ secrets.DOCKER_HUB_PASSWORD }} # builds container - name: Build and push FlowForge Application container - if: false uses: docker/build-push-action@v3.2.0 with: context: helm/flowforge-container @@ -50,7 +49,6 @@ jobs: tags: ${{ steps.meta.outputs.tags }} push: true - name: Push README - if: false uses: peter-evans/dockerhub-description@v3 with: repository: flowforge/forge-k8s @@ -58,7 +56,6 @@ jobs: password: ${{ secrets.DOCKER_HUB_PASSWORD }} readme-filepath: ./helm/flowforge-container/README.md - name: Push README flowfuse - if: false uses: peter-evans/dockerhub-description@v3 with: repository: flowfuse/forge-k8s @@ -67,7 +64,6 @@ jobs: readme-filepath: ./helm/flowforge-container/README.md build_nodered_container: - if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -136,19 +132,15 @@ jobs: flowforge/node-red flowfuse/node-red - name: Setup QEMU - if: false uses: docker/setup-qemu-action@v3 - name: Setup Docker buildx - if: false uses: docker/setup-buildx-action@v3 - name: docker login - if: false uses: docker/login-action@v3 with: username: flowforge password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Build and push FlowForge Application container - if: false uses: docker/build-push-action@v3.2.0 with: context: helm/node-red-container @@ -176,19 +168,15 @@ jobs: flowforge/node-red flowfuse/node-red - name: Setup QEMU - if: false uses: docker/setup-qemu-action@v3 - name: Setup Docker buildx - if: false uses: docker/setup-buildx-action@v3 - name: docker login - if: false uses: docker/login-action@v3 with: username: flowforge password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Build and push FlowForge Application container - if: false uses: docker/build-push-action@v3.2.0 with: context: helm/node-red-container @@ -198,7 +186,6 @@ jobs: push: true build_file_server_container: - if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v3