Skip to content

Commit

Permalink
Merge branch 'FlowFuse:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
flecoufle authored Oct 13, 2023
2 parents 44a5fc9 + 1001584 commit 3995837
Show file tree
Hide file tree
Showing 27 changed files with 660 additions and 103 deletions.
61 changes: 9 additions & 52 deletions .github/workflows/build-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
repository: 'flowforge/helm'
repository: 'flowfuse/helm'
path: 'helm'
# sets options for Docker build
# will tag contianers with GH tag name
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
repository: 'flowforge/helm'
repository: 'flowfuse/helm'
path: 'helm'
- name: Docker Meta Data
id: meta
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
repository: 'flowforge/helm'
repository: 'flowfuse/helm'
path: 'helm'
- name: Docker Meta Data
id: meta
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
repository: 'flowforge/helm'
repository: 'flowfuse/helm'
path: 'helm'
- name: Docker Meta Data
id: meta
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
repository: 'flowforge/helm'
repository: 'flowfuse/helm'
path: 'helm'
- name: Docker Meta Data
id: meta
Expand Down Expand Up @@ -206,51 +206,8 @@ jobs:
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
readme-filepath: ./helm/file-server/README.md


build_device_agent_container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: 'flowforge/helm'
path: 'helm'
- name: Docker Meta Data
id: meta
uses: docker/metadata-action@v3
with:
tags: |
type=semver,event=tag,pattern={{version}}
flavor: |
latest=true
images: |
flowforge/device-agent
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v1
- name: docker login
uses: docker/login-action@v1
with:
username: flowforge
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push FlowForge Application container
uses: docker/build-push-action@v2
with:
context: helm/flowforge-device-agent
file: helm/flowforge-device-agent/Dockerfile
platforms: linux/amd64, linux/arm64, linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
push: true
- name: Push README
uses: peter-evans/dockerhub-description@v3
with:
repository: flowforge/device-agent
username: flowforge
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
readme-filepath: ./helm/flowforge-device-agent/README.md

publish_helm:
needs: [build_application_container, build_nodered_container, build_nodered_container_223, build_file_server_container, build_device_agent_container]
needs: [build_application_container, build_nodered_container, build_nodered_container_223, build_file_server_container]
runs-on: ubuntu-latest
steps:
- name: Install Helm
Expand All @@ -263,7 +220,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
repository: 'flowforge/helm'
repository: 'flowfuse/helm'
fetch-depth: 0
path: 'helm'
- name: Package
Expand All @@ -272,9 +229,9 @@ jobs:
cd helm
git checkout gh-pages
mv ../flowforge-*.tgz .
helm repo index --url https://flowforge.github.io/helm .
helm repo index --url https://flowfuse.github.io/helm .
git add .
git -c user.name='FlowForge Build Bot' -c user.email='noreply@flowforge.com' commit -m "Add ${{ github.ref_name }} helm chart"
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') }}
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/fileserver-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: File-server - build and deploy
on:
workflow_dispatch:
inputs:
fileserver_release_name:
description: 'file-server package version'
required: false
default: 'nightly'
fileserver_ref:
description: 'file-server package ref'
required: false
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
build:
name: Build single-architecture container images
uses: flowfuse/github-actions-workflows/.github/workflows/build_container_image.yml@7808b849474ae9bc8dfc7f6db19e66d241018c94
with:
image_name: 'file-server'
package_dependencies: |
@flowforge/file-server
build_context: 'file-server'
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
secrets:
npm_registry_auth_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}

build-multi-architecture:
name: Build multi-architecture container image
needs: build
uses: flowfuse/github-actions-workflows/.github/workflows/merge_multiarch_images.yml@7808b849474ae9bc8dfc7f6db19e66d241018c94
with:
image_name: 'file-server'
secrets:
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}

deploy-stage:
name: Deploy to staging environment
needs: build-multi-architecture
uses: flowfuse/github-actions-workflows/.github/workflows/deploy_container_image.yml@7808b849474ae9bc8dfc7f6db19e66d241018c94
with:
environment: stage
service_name: 'file-server'
deployment_name: 'flowforge-file'
container_name: 'file-storage'
image: ${{ needs.build-multi-architecture.outputs.image }}
secrets:
aws_access_key_id: ${{ secrets.STAGING_AWS_ID }}
aws_secret_access_key: ${{ secrets.STAGING_AWS_KEY }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}

deploy-prod:
if: github.ref_name == 'main'
name: Deploy to production environment
needs: [build-multi-architecture, deploy-stage]
uses: flowfuse/github-actions-workflows/.github/workflows/deploy_container_image.yml@7808b849474ae9bc8dfc7f6db19e66d241018c94
with:
environment: production
service_name: 'file-server'
deployment_name: 'flowforge-file'
container_name: 'file-storage'
image: ${{ needs.build-multi-architecture.outputs.image }}
secrets:
aws_access_key_id: ${{ secrets.PRODUCTION_AWS_ID }}
aws_secret_access_key: ${{ secrets.PRODUCTION_AWS_KEY }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}
78 changes: 78 additions & 0 deletions .github/workflows/flowforge-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Flowforge - build and deploy
on:
workflow_dispatch:
inputs:
flowforge_release_name:
description: 'flowforge package version'
required: false
default: 'nightly'
flowforge_ref:
description: 'flowforge package ref'
required: false
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
build:
name: Build single-architecture container images
uses: flowfuse/github-actions-workflows/.github/workflows/build_container_image.yml@7808b849474ae9bc8dfc7f6db19e66d241018c94
with:
image_name: 'forge-k8s'
package_dependencies: |
@flowforge/flowforge
@flowforge/kubernetes
build_context: 'flowforge-container'
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
secrets:
npm_registry_auth_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}

build-multi-architecture:
name: Build multi-architecture container image
needs: build
uses: flowfuse/github-actions-workflows/.github/workflows/merge_multiarch_images.yml@7808b849474ae9bc8dfc7f6db19e66d241018c94
with:
image_name: 'forge-k8s'
secrets:
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}

deploy-stage:
name: Deploy to staging environment
needs: build-multi-architecture
uses: flowfuse/github-actions-workflows/.github/workflows/deploy_container_image.yml@7808b849474ae9bc8dfc7f6db19e66d241018c94
with:
environment: stage
service_name: 'forge-k8s'
deployment_name: flowforge
container_name: forge
image: ${{ needs.build-multi-architecture.outputs.image }}
secrets:
aws_access_key_id: ${{ secrets.STAGING_AWS_ID }}
aws_secret_access_key: ${{ secrets.STAGING_AWS_KEY }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}

deploy-prod:
if: github.ref_name == 'main'
name: Deploy to production environment
needs: [build-multi-architecture, deploy-stage]
uses: flowfuse/github-actions-workflows/.github/workflows/deploy_container_image.yml@7808b849474ae9bc8dfc7f6db19e66d241018c94
with:
environment: production
service_name: 'forge-k8s'
deployment_name: flowforge
container_name: forge
image: ${{ needs.build-multi-architecture.outputs.image }}
secrets:
aws_access_key_id: ${{ secrets.PRODUCTION_AWS_ID }}
aws_secret_access_key: ${{ secrets.PRODUCTION_AWS_KEY }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}
67 changes: 67 additions & 0 deletions .github/workflows/nodered-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build Node-RED container
on:
workflow_dispatch:
inputs:
nr_project_nodes_release_name:
description: 'nr-project-nodes package version'
required: false
default: 'nightly'
nr_project_nodes_ref:
description: 'nr-project-nodes package ref'
required: false
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
build-stage-302:
uses: flowfuse/github-actions-workflows/.github/workflows/build_container_image.yml@e3e734b910af78371b2c9a1c6856446d17421f50
with:
environment: 'stage'
image_name: 'node-red'
dockerfile_path: Dockerfile
package_dependencies: |
@flowforge/nr-project-nodes
build_context: 'node-red-container'
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
secrets:
npm_registry_auth_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
aws_access_key_id: ${{ secrets.STAGING_AWS_ID }}
aws_access_key_secret: ${{ secrets.STAGING_AWS_KEY }}
build-stage-223:
uses: flowfuse/github-actions-workflows/.github/workflows/build_container_image.yml@e3e734b910af78371b2c9a1c6856446d17421f50
with:
environment: 'stage'
image_name: 'node-red'
image_tag_prefix: '2.2.3-'
dockerfile_path: Dockerfile-2.2.x
package_dependencies: |
@flowforge/nr-project-nodes
build_context: 'node-red-container'
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
secrets:
npm_registry_auth_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
aws_access_key_id: ${{ secrets.STAGING_AWS_ID }}
aws_access_key_secret: ${{ secrets.STAGING_AWS_KEY }}
build-stage-310:
uses: flowfuse/github-actions-workflows/.github/workflows/build_container_image.yml@e3e734b910af78371b2c9a1c6856446d17421f50
with:
environment: 'stage'
image_name: 'node-red'
image_tag_prefix: '3.1.0-'
dockerfile_path: Dockerfile-3.1
package_dependencies: |
@flowforge/nr-project-nodes
build_context: 'node-red-container'
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
secrets:
npm_registry_auth_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
aws_access_key_id: ${{ secrets.STAGING_AWS_ID }}
aws_access_key_secret: ${{ secrets.STAGING_AWS_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/project-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ on:
- opened
jobs:
add_to_product_board:
uses: flowforge/.github/.github/workflows/project-automation.yml@main
uses: flowfuse/.github/.github/workflows/project-automation.yml@main
secrets:
token: ${{ secrets.PROJECT_ACCESS_TOKEN }}
Loading

0 comments on commit 3995837

Please sign in to comment.