-
-
Notifications
You must be signed in to change notification settings - Fork 10
ci: Add workflow for custom nifi image #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
56f43e3
add workflow for custom nifi image
xeniape c5029f2
add ref to actions and fix env
xeniape 31c5bda
lint fixes and env fix
xeniape 9fe2948
more lint fixes
xeniape 30be4b1
lints
xeniape bb58ec9
linter fixes
xeniape 5a0eb36
linter and adjust image arch env
xeniape 88a038f
add github env back in for later steps
xeniape 1cc016f
add quotes around github_env
xeniape a995b9f
combine steps and rename temp registry name
xeniape 20ff64c
change oci repo
xeniape cdff1f7
fix env name
xeniape 49ac91b
update bot username and password
xeniape 7c0be4f
update bot username and password
xeniape 1d82007
remove build comment
xeniape 9217e29
use build-container-image action
xeniape 293067c
add source-image-uri
xeniape bc59223
use the new actions version
xeniape File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
--- | ||
name: Build and publish NiFi for signal-processing demo | ||
|
||
env: | ||
IMAGE_NAME: nifi | ||
IMAGE_VERSION: 1.27.0-postgresql | ||
REGISTRY_PATH: stackable | ||
DOCKERFILE_PATH: "../demos/signal-processing/Dockerfile-nifi" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- demos/signal-processing/Dockerfile-nifi | ||
- .github/workflows/dev_nifi.yaml | ||
|
||
jobs: | ||
build: | ||
name: Build/Publish ${{ matrix.runner.arch }} Image | ||
permissions: | ||
id-token: write | ||
runs-on: ${{ matrix.runner.name }} | ||
strategy: | ||
matrix: | ||
runner: | ||
- {name: "ubuntu-latest", arch: "amd64"} | ||
- {name: "ubicloud-standard-8-arm", arch: "arm64"} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | ||
with: | ||
# This might remove tools that are actually needed, if set to "true" but | ||
# frees about 6 GB. | ||
tool-cache: false | ||
|
||
# All of these default to true, but feel free to set to "false" if | ||
# necessary for your workflow. | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
docker-images: true | ||
swap-storage: true | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 | ||
|
||
- name: Build image | ||
env: | ||
IMAGE_REPOSITORY: ${{ env.IMAGE_NAME }} | ||
IMAGE_ARCH: ${{ matrix.runner.arch }} | ||
shell: bash | ||
run: | | ||
set -euo pipefail | ||
echo "Building ${{ env.IMAGE_NAME }}" | ||
docker buildx build -f "${{ env.DOCKERFILE_PATH }}" --platform "linux/${{ env.IMAGE_ARCH }}" --tag "localhost/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}" . | ||
echo "IMAGE_ARCH=${{ env.IMAGE_ARCH }}" >> "$GITHUB_ENV" | ||
|
||
- name: Publish Container Image on docker.stackable.tech | ||
uses: stackabletech/actions/publish-image@e8781161bc1eb037198098334cec6061fe24b6c3 # 0.0.2 | ||
with: | ||
image-registry-uri: docker.stackable.tech | ||
image-registry-username: github | ||
image-registry-password: ${{ secrets.NEXUS_PASSWORD }} | ||
image-repository: demos/${{ env.IMAGE_NAME }} | ||
image-manifest-tag: ${{ env.IMAGE_VERSION }}-${{ env.IMAGE_ARCH }} | ||
source-image-uri: localhost/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }} | ||
|
||
- name: Publish Container Image on oci.stackable.tech | ||
uses: stackabletech/actions/publish-image@e8781161bc1eb037198098334cec6061fe24b6c3 # 0.0.2 | ||
with: | ||
image-registry-uri: oci.stackable.tech | ||
image-registry-username: robot$stackable+github-action-build | ||
image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }} | ||
image-repository: ${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }} | ||
image-manifest-tag: ${{ env.IMAGE_VERSION }}-${{ env.IMAGE_ARCH }} | ||
source-image-uri: localhost/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }} | ||
|
||
publish_manifests: | ||
name: Build/Publish Manifest | ||
needs: [build] | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Publish and Sign Image Index Manifest to docker.stackable.tech | ||
uses: stackabletech/actions/publish-index-manifest@e8781161bc1eb037198098334cec6061fe24b6c3 # 0.0.2 | ||
with: | ||
image-registry-uri: docker.stackable.tech | ||
image-registry-username: github | ||
image-registry-password: ${{ secrets.NEXUS_PASSWORD }} | ||
image-repository: demos/${{ env.IMAGE_NAME }} | ||
image-index-manifest-tag: ${{ env.IMAGE_VERSION }} | ||
|
||
- name: Publish and Sign Image Index Manifest to oci.stackable.tech | ||
uses: stackabletech/actions/publish-index-manifest@e8781161bc1eb037198098334cec6061fe24b6c3 # 0.0.2 | ||
with: | ||
image-registry-uri: oci.stackable.tech | ||
image-registry-username: robot$stackable+github-action-build | ||
image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }} | ||
image-repository: ${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }} | ||
image-index-manifest-tag: ${{ env.IMAGE_VERSION }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# docker build -f ./Dockerfile-nifi -t docker.stackable.tech/demos/nifi:1.27.0-postgresql . | ||
|
||
FROM docker.stackable.tech/stackable/nifi:1.27.0-stackable24.7.0 | ||
|
||
RUN curl --fail -o /stackable/nifi/postgresql-42.6.0.jar "https://repo.stackable.tech/repository/misc/postgresql-timescaledb/postgresql-42.6.0.jar" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.