From 034b234c5a2cd718aa3f8a60c1ae5d15f91c2b6b Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 13:04:19 -0500 Subject: [PATCH 01/13] adding action for creating docker container. --- .github/workflows/create-docker-action.yml | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/create-docker-action.yml diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml new file mode 100644 index 000000000..4f8846688 --- /dev/null +++ b/.github/workflows/create-docker-action.yml @@ -0,0 +1,43 @@ +name: run_ci + +on: + workflow_dispatch: + release: + types: [published] + +env: + REGISTRY: ghcr.io + BACKEND_IMAGE: spiffworkflow-backend + +jobs: + build-and-push-backend-container: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.BACKEND_IMAGE }} + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From e3657bc5444b39ccf1d0de6eddc84cb127762bf2 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 13:17:51 -0500 Subject: [PATCH 02/13] just for testing --- .github/workflows/create-docker-action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml index 4f8846688..ebea974e3 100644 --- a/.github/workflows/create-docker-action.yml +++ b/.github/workflows/create-docker-action.yml @@ -2,6 +2,8 @@ name: run_ci on: workflow_dispatch: + push: + branches: ['feature/releases'] # just for testing for a bit. release: types: [published] From 0179987aff7202d09baf109b955496abeb92833a Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 13:27:56 -0500 Subject: [PATCH 03/13] gotta push to test minor tweaks. --- .github/workflows/backend_tests.yml | 3 ++- .github/workflows/create-docker-action.yml | 26 +++++++++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/backend_tests.yml b/.github/workflows/backend_tests.yml index d80dd8f3e..42fb23595 100644 --- a/.github/workflows/backend_tests.yml +++ b/.github/workflows/backend_tests.yml @@ -1,7 +1,8 @@ name: Tests on: - - push + push: + branches: [ 'main' ] # just for testing for a bit. - pull_request defaults: diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml index ebea974e3..4ff91669d 100644 --- a/.github/workflows/create-docker-action.yml +++ b/.github/workflows/create-docker-action.yml @@ -4,6 +4,11 @@ on: workflow_dispatch: push: branches: ['feature/releases'] # just for testing for a bit. + tags: + - 'v*' + pull_request: + branches: + - 'main' release: types: [published] @@ -21,23 +26,24 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: name/app + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 - with: - images: ${{ env.REGISTRY }}/${{ env.BACKEND_IMAGE }} - - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@v3 with: context: . push: true From 1fd0a3d260d3fc16a70517cfba17e5f5dfc8d4ca Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 13:29:40 -0500 Subject: [PATCH 04/13] correct context. --- .github/workflows/create-docker-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml index 4ff91669d..ed0dee77c 100644 --- a/.github/workflows/create-docker-action.yml +++ b/.github/workflows/create-docker-action.yml @@ -45,7 +45,7 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@v3 with: - context: . + context: spiffworkflow-backend/. push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 2c3572e9de6d292e377493767c765932b581193b Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 13:56:51 -0500 Subject: [PATCH 05/13] buildx added to use a sub-directory --- .github/workflows/create-docker-action.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml index ed0dee77c..45e2c6cde 100644 --- a/.github/workflows/create-docker-action.yml +++ b/.github/workflows/create-docker-action.yml @@ -17,7 +17,7 @@ env: BACKEND_IMAGE: spiffworkflow-backend jobs: - build-and-push-backend-container: + build-and-push-backend-docker: runs-on: ubuntu-latest permissions: @@ -42,10 +42,16 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker image + # Setting up Docker Buildx with docker-container driver is required + # at the moment to be able to use a subdirectory with Git context + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push Backend Docker Image uses: docker/build-push-action@v3 with: - context: spiffworkflow-backend/. + context: "{{defaultContext}}:spiffworkflow-backend" push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + From 44926213da8a2d13f6cdca92194f1caada4995d5 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 14:09:43 -0500 Subject: [PATCH 06/13] updating tag. --- .github/workflows/create-docker-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml index 45e2c6cde..1a7e2305e 100644 --- a/.github/workflows/create-docker-action.yml +++ b/.github/workflows/create-docker-action.yml @@ -52,6 +52,6 @@ jobs: with: context: "{{defaultContext}}:spiffworkflow-backend" push: true - tags: ${{ steps.meta.outputs.tags }} + tags: "sartography/spiffworkflow-backend:${{ steps.meta.outputs.tags }}" labels: ${{ steps.meta.outputs.labels }} From e433e4e8ae144999ae3be55138cb0f50d906bebe Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 14:22:53 -0500 Subject: [PATCH 07/13] Fixing setup again. --- .github/workflows/create-docker-action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml index 1a7e2305e..967cdd34e 100644 --- a/.github/workflows/create-docker-action.yml +++ b/.github/workflows/create-docker-action.yml @@ -31,8 +31,6 @@ jobs: - name: Docker meta id: meta uses: docker/metadata-action@v4 - with: - images: name/app - name: Login to DockerHub if: github.event_name != 'pull_request' From 9cd699b11e6a8b845832d17e85a03c807b0b5da9 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 14:26:37 -0500 Subject: [PATCH 08/13] and again. --- .github/workflows/create-docker-action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml index 967cdd34e..db4ee84ce 100644 --- a/.github/workflows/create-docker-action.yml +++ b/.github/workflows/create-docker-action.yml @@ -31,6 +31,8 @@ jobs: - name: Docker meta id: meta uses: docker/metadata-action@v4 + with: + images: sartography/spiffworkflow-backend - name: Login to DockerHub if: github.event_name != 'pull_request' @@ -50,6 +52,6 @@ jobs: with: context: "{{defaultContext}}:spiffworkflow-backend" push: true - tags: "sartography/spiffworkflow-backend:${{ steps.meta.outputs.tags }}" + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 99628e667433cc513cd575696101361a8278b662 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 14:35:47 -0500 Subject: [PATCH 09/13] And another. --- .github/workflows/backend_tests.yml | 2 +- .github/workflows/create-docker-action.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backend_tests.yml b/.github/workflows/backend_tests.yml index 42fb23595..209496eb7 100644 --- a/.github/workflows/backend_tests.yml +++ b/.github/workflows/backend_tests.yml @@ -1,7 +1,7 @@ name: Tests on: - push: + - push: branches: [ 'main' ] # just for testing for a bit. - pull_request diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml index db4ee84ce..68888794d 100644 --- a/.github/workflows/create-docker-action.yml +++ b/.github/workflows/create-docker-action.yml @@ -32,7 +32,8 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: sartography/spiffworkflow-backend + images: + name=sartography/spiffworkflow-backend - name: Login to DockerHub if: github.event_name != 'pull_request' From db368fbb415a7aadc048232fbf9c7f7be17f64a9 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 14:50:00 -0500 Subject: [PATCH 10/13] some random thing. --- .github/workflows/create-docker-action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml index 68888794d..4ffacb47b 100644 --- a/.github/workflows/create-docker-action.yml +++ b/.github/workflows/create-docker-action.yml @@ -32,8 +32,7 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: - name=sartography/spiffworkflow-backend + images: some/random/thing - name: Login to DockerHub if: github.event_name != 'pull_request' From f05e972f15105702b73271d3d58b54a896d985d6 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 14:57:14 -0500 Subject: [PATCH 11/13] again --- .github/workflows/create-docker-action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml index 4ffacb47b..5acb7fba0 100644 --- a/.github/workflows/create-docker-action.yml +++ b/.github/workflows/create-docker-action.yml @@ -32,7 +32,9 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: some/random/thing + images: | + sartography/spiffworkflow-backend + - name: Login to DockerHub if: github.event_name != 'pull_request' @@ -52,6 +54,6 @@ jobs: with: context: "{{defaultContext}}:spiffworkflow-backend" push: true - tags: ${{ steps.meta.outputs.tags }} + tags: sartography/spiffworkflow-backend:latest labels: ${{ steps.meta.outputs.labels }} From 56109f3cf75f33e264a041daa8cd1d0a2ac11db2 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 15:00:08 -0500 Subject: [PATCH 12/13] removing unrelated github action changes. --- .github/workflows/backend_tests.yml | 3 +- .github/workflows/create-docker-action.yml | 59 ---------------------- 2 files changed, 1 insertion(+), 61 deletions(-) delete mode 100644 .github/workflows/create-docker-action.yml diff --git a/.github/workflows/backend_tests.yml b/.github/workflows/backend_tests.yml index 209496eb7..d80dd8f3e 100644 --- a/.github/workflows/backend_tests.yml +++ b/.github/workflows/backend_tests.yml @@ -1,8 +1,7 @@ name: Tests on: - - push: - branches: [ 'main' ] # just for testing for a bit. + - push - pull_request defaults: diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml deleted file mode 100644 index 5acb7fba0..000000000 --- a/.github/workflows/create-docker-action.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: run_ci - -on: - workflow_dispatch: - push: - branches: ['feature/releases'] # just for testing for a bit. - tags: - - 'v*' - pull_request: - branches: - - 'main' - release: - types: [published] - -env: - REGISTRY: ghcr.io - BACKEND_IMAGE: spiffworkflow-backend - -jobs: - build-and-push-backend-docker: - runs-on: ubuntu-latest - - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: | - sartography/spiffworkflow-backend - - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - # Setting up Docker Buildx with docker-container driver is required - # at the moment to be able to use a subdirectory with Git context - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build and push Backend Docker Image - uses: docker/build-push-action@v3 - with: - context: "{{defaultContext}}:spiffworkflow-backend" - push: true - tags: sartography/spiffworkflow-backend:latest - labels: ${{ steps.meta.outputs.labels }} - From c77747393545a503dce727032c14df2e2e6431f4 Mon Sep 17 00:00:00 2001 From: Jon Herron Date: Fri, 18 Nov 2022 13:31:22 -0500 Subject: [PATCH 13/13] Add connector-proxy-demo --- bin/pull-subtrees | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/pull-subtrees b/bin/pull-subtrees index cc029ef90..8002791b9 100755 --- a/bin/pull-subtrees +++ b/bin/pull-subtrees @@ -11,7 +11,8 @@ for subtree in "SpiffWorkflow" \ "spiffworkflow-backend" \ "spiffworkflow-frontend" \ "flask-bpmn" \ - "bpmn-js-spiffworkflow" + "bpmn-js-spiffworkflow" \ + "connector-proxy-demo" do GIT_MERGE_AUTOEDIT=no git subtree pull --prefix=$subtree git@github.com:sartography/$subtree.git main --squash done