Skip to content

Commit 27ee877

Browse files
authored
ci: Add workflow for custom nifi image (#103)
* add workflow for custom nifi image * add ref to actions and fix env * lint fixes and env fix * more lint fixes * lints * linter fixes * linter and adjust image arch env * add github env back in for later steps * add quotes around github_env * combine steps and rename temp registry name * change oci repo * fix env name * update bot username and password * update bot username and password * remove build comment * use build-container-image action * add source-image-uri * use the new actions version
1 parent 994b333 commit 27ee877

File tree

2 files changed

+88
-2
lines changed

2 files changed

+88
-2
lines changed

.github/workflows/dev_nifi.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
name: Build and publish NiFi for signal-processing demo
3+
4+
env:
5+
IMAGE_NAME: nifi
6+
IMAGE_VERSION: 1.27.0-postgresql
7+
REGISTRY_PATH: stackable
8+
DOCKERFILE_PATH: "../demos/signal-processing/Dockerfile-nifi"
9+
10+
on:
11+
workflow_dispatch:
12+
push:
13+
branches:
14+
- main
15+
paths:
16+
- demos/signal-processing/Dockerfile-nifi
17+
- .github/workflows/dev_nifi.yaml
18+
19+
jobs:
20+
build:
21+
name: Build/Publish ${{ matrix.runner.arch }} Image
22+
permissions:
23+
id-token: write
24+
runs-on: ${{ matrix.runner.name }}
25+
strategy:
26+
matrix:
27+
runner:
28+
- {name: "ubuntu-latest", arch: "amd64"}
29+
- {name: "ubicloud-standard-8-arm", arch: "arm64"}
30+
steps:
31+
- name: Checkout Repository
32+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
33+
34+
- name: Build image
35+
id: build
36+
uses: stackabletech/actions/build-container-image@ab97c67d79a79d9c6b0dc81b5dbe2fc5fd216a5a # v0.0.4
37+
with:
38+
image-name: ${{ env.IMAGE_NAME }}
39+
image-index-manifest-tag: ${{ env.IMAGE_VERSION }}
40+
container-file: ${{ env.DOCKERFILE_PATH }}
41+
42+
- name: Publish Container Image on docker.stackable.tech
43+
uses: stackabletech/actions/publish-image@ab97c67d79a79d9c6b0dc81b5dbe2fc5fd216a5a # v0.0.4
44+
with:
45+
image-registry-uri: docker.stackable.tech
46+
image-registry-username: github
47+
image-registry-password: ${{ secrets.NEXUS_PASSWORD }}
48+
image-repository: demos/${{ env.IMAGE_NAME }}
49+
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
50+
source-image-uri: ${{ steps.build.outputs.image-manifest-uri }}
51+
52+
- name: Publish Container Image on oci.stackable.tech
53+
uses: stackabletech/actions/publish-image@ab97c67d79a79d9c6b0dc81b5dbe2fc5fd216a5a # v0.0.4
54+
with:
55+
image-registry-uri: oci.stackable.tech
56+
image-registry-username: robot$stackable+github-action-build
57+
image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }}
58+
image-repository: ${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }}
59+
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
60+
source-image-uri: ${{ steps.build.outputs.image-manifest-uri }}
61+
62+
publish_manifests:
63+
name: Build/Publish Manifest
64+
needs: [build]
65+
permissions:
66+
id-token: write
67+
runs-on: ubuntu-latest
68+
steps:
69+
- name: Checkout Repository
70+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
71+
72+
- name: Publish and Sign Image Index Manifest to docker.stackable.tech
73+
uses: stackabletech/actions/publish-index-manifest@ab97c67d79a79d9c6b0dc81b5dbe2fc5fd216a5a # v0.0.4
74+
with:
75+
image-registry-uri: docker.stackable.tech
76+
image-registry-username: github
77+
image-registry-password: ${{ secrets.NEXUS_PASSWORD }}
78+
image-repository: demos/${{ env.IMAGE_NAME }}
79+
image-index-manifest-tag: ${{ env.IMAGE_VERSION }}
80+
81+
- name: Publish and Sign Image Index Manifest to oci.stackable.tech
82+
uses: stackabletech/actions/publish-index-manifest@ab97c67d79a79d9c6b0dc81b5dbe2fc5fd216a5a # v0.0.4
83+
with:
84+
image-registry-uri: oci.stackable.tech
85+
image-registry-username: robot$stackable+github-action-build
86+
image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }}
87+
image-repository: ${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }}
88+
image-index-manifest-tag: ${{ env.IMAGE_VERSION }}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# docker build -f ./Dockerfile-nifi -t docker.stackable.tech/demos/nifi:1.27.0-postgresql .
2-
31
FROM docker.stackable.tech/stackable/nifi:1.27.0-stackable24.7.0
42

53
RUN curl --fail -o /stackable/nifi/postgresql-42.6.0.jar "https://repo.stackable.tech/repository/misc/postgresql-timescaledb/postgresql-42.6.0.jar"

0 commit comments

Comments
 (0)