Skip to content

Commit f494190

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/nifi-opa-authorizer
2 parents 3da276d + 54ce0e8 commit f494190

29 files changed

+398
-3941
lines changed

.github/workflows/build_airflow.yaml

Lines changed: 10 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: Build Airflow
33
run-name: |
44
Build Airflow (attempt #${{ github.run_attempt }})
55
6-
env:
7-
PRODUCT_NAME: airflow
8-
SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}
9-
106
on:
117
workflow_dispatch:
128
schedule:
@@ -22,149 +18,15 @@ on:
2218
- stackable-base/**
2319
- .github/actions/**
2420
- .github/workflows/build_airflow.yaml
21+
- .github/workflows/reusable_build_image.yaml
2522

2623
jobs:
27-
generate_matrix:
28-
name: Generate Version List
29-
runs-on: ubuntu-latest
30-
steps:
31-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
32-
with:
33-
persist-credentials: false
34-
- id: shard
35-
uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
36-
with:
37-
product-name: ${{ env.PRODUCT_NAME }}
38-
outputs:
39-
versions: ${{ steps.shard.outputs.versions }}
40-
41-
build:
42-
name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image
43-
needs: [generate_matrix]
44-
permissions:
45-
id-token: write
46-
runs-on: ${{ matrix.runner.name }}
47-
strategy:
48-
fail-fast: false
49-
matrix:
50-
runner:
51-
- {name: "ubuntu-latest", arch: "amd64"}
52-
- {name: "ubicloud-standard-8-arm", arch: "arm64"}
53-
versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }}
54-
steps:
55-
- name: Checkout Repository
56-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
57-
with:
58-
persist-credentials: false
59-
60-
- name: Free Disk Space
61-
uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
62-
63-
- name: Build Product Image
64-
id: build
65-
uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
66-
with:
67-
product-name: ${{ env.PRODUCT_NAME }}
68-
product-version: ${{ matrix.versions }}
69-
build-cache-password: ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
70-
sdp-version: ${{ env.SDP_VERSION }}
71-
72-
- name: Publish Container Image on docker.stackable.tech
73-
uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
74-
with:
75-
image-registry-uri: docker.stackable.tech
76-
image-registry-username: github
77-
image-registry-password: ${{ secrets.NEXUS_PASSWORD }}
78-
image-repository: stackable/${{ env.PRODUCT_NAME }}
79-
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
80-
source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }}
81-
82-
- name: Publish Container Image on oci.stackable.tech
83-
uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
84-
with:
85-
image-registry-uri: oci.stackable.tech
86-
image-registry-username: robot$sdp+github-action-build
87-
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
88-
image-repository: sdp/${{ env.PRODUCT_NAME }}
89-
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
90-
source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }}
91-
92-
publish_manifests:
93-
name: Build/Publish ${{ matrix.versions }} Manifests
94-
needs: [generate_matrix, build]
95-
permissions:
96-
id-token: write
97-
runs-on: ubuntu-latest
98-
strategy:
99-
fail-fast: false
100-
matrix:
101-
versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }}
102-
steps:
103-
- name: Checkout Repository
104-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
105-
with:
106-
persist-credentials: false
107-
108-
- name: Publish and Sign Image Index Manifest to docker.stackable.tech
109-
uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
110-
with:
111-
image-registry-uri: docker.stackable.tech
112-
image-registry-username: github
113-
image-registry-password: ${{ secrets.NEXUS_PASSWORD }}
114-
image-repository: stackable/${{ env.PRODUCT_NAME }}
115-
image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }}
116-
117-
- name: Publish and Sign Image Index Manifest to oci.stackable.tech
118-
uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
119-
with:
120-
image-registry-uri: oci.stackable.tech
121-
image-registry-username: robot$sdp+github-action-build
122-
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
123-
image-repository: sdp/${{ env.PRODUCT_NAME }}
124-
image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }}
125-
126-
notify:
127-
name: Failure Notification
128-
needs: [generate_matrix, build, publish_manifests]
129-
runs-on: ubuntu-latest
130-
if: failure()
131-
steps:
132-
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
133-
with:
134-
channel-id: "C07UG6JH44F" # notifications-container-images
135-
payload: |
136-
{
137-
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
138-
"attachments": [
139-
{
140-
"pretext": "See the details below for a summary of which job(s) failed.",
141-
"color": "#aa0000",
142-
"fields": [
143-
{
144-
"title": "Generate Version List",
145-
"short": true,
146-
"value": "${{ needs.generate_matrix.result }}"
147-
},
148-
{
149-
"title": "Build/Publish Image",
150-
"short": true,
151-
"value": "${{ needs.build.result }}"
152-
},
153-
{
154-
"title": "Build/Publish Manifests",
155-
"short": true,
156-
"value": "${{ needs.publish_manifests.result }}"
157-
}
158-
],
159-
"actions": [
160-
{
161-
"type": "button",
162-
"text": "Go to workflow run",
163-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
164-
}
165-
]
166-
}
167-
]
168-
}
169-
env:
170-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
24+
build_image:
25+
name: Reusable Workflow
26+
uses: ./.github/workflows/reusable_build_image.yaml
27+
secrets:
28+
harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
29+
slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
30+
with:
31+
product-name: airflow
32+
sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}

.github/workflows/build_druid.yaml

Lines changed: 10 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: Build Druid
33
run-name: |
44
Build Druid (attempt #${{ github.run_attempt }})
55
6-
env:
7-
PRODUCT_NAME: druid
8-
SDP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}
9-
106
on:
117
workflow_dispatch:
128
schedule:
@@ -24,149 +20,15 @@ on:
2420
- java-devel/**
2521
- .github/actions/**
2622
- .github/workflows/build_druid.yaml
23+
- .github/workflows/reusable_build_image.yaml
2724

2825
jobs:
29-
generate_matrix:
30-
name: Generate Version List
31-
runs-on: ubuntu-latest
32-
steps:
33-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
34-
with:
35-
persist-credentials: false
36-
- id: shard
37-
uses: stackabletech/actions/shard@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
38-
with:
39-
product-name: ${{ env.PRODUCT_NAME }}
40-
outputs:
41-
versions: ${{ steps.shard.outputs.versions }}
42-
43-
build:
44-
name: Build/Publish ${{ matrix.versions }}-${{ matrix.runner.arch }} Image
45-
needs: [generate_matrix]
46-
permissions:
47-
id-token: write
48-
runs-on: ${{ matrix.runner.name }}
49-
strategy:
50-
fail-fast: false
51-
matrix:
52-
runner:
53-
- {name: "ubuntu-latest", arch: "amd64"}
54-
- {name: "ubicloud-standard-8-arm", arch: "arm64"}
55-
versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }}
56-
steps:
57-
- name: Checkout Repository
58-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
59-
with:
60-
persist-credentials: false
61-
62-
- name: Free Disk Space
63-
uses: stackabletech/actions/free-disk-space@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
64-
65-
- name: Build Product Image
66-
id: build
67-
uses: stackabletech/actions/build-product-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
68-
with:
69-
product-name: ${{ env.PRODUCT_NAME }}
70-
product-version: ${{ matrix.versions }}
71-
build-cache-password: ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
72-
sdp-version: ${{ env.SDP_VERSION }}
73-
74-
- name: Publish Container Image on docker.stackable.tech
75-
uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
76-
with:
77-
image-registry-uri: docker.stackable.tech
78-
image-registry-username: github
79-
image-registry-password: ${{ secrets.NEXUS_PASSWORD }}
80-
image-repository: stackable/${{ env.PRODUCT_NAME }}
81-
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
82-
source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }}
83-
84-
- name: Publish Container Image on oci.stackable.tech
85-
uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
86-
with:
87-
image-registry-uri: oci.stackable.tech
88-
image-registry-username: robot$sdp+github-action-build
89-
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
90-
image-repository: sdp/${{ env.PRODUCT_NAME }}
91-
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
92-
source-image-uri: localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }}
93-
94-
publish_manifests:
95-
name: Build/Publish ${{ matrix.versions }} Manifests
96-
needs: [generate_matrix, build]
97-
permissions:
98-
id-token: write
99-
runs-on: ubuntu-latest
100-
strategy:
101-
fail-fast: false
102-
matrix:
103-
versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }}
104-
steps:
105-
- name: Checkout Repository
106-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
107-
with:
108-
persist-credentials: false
109-
110-
- name: Publish and Sign Image Index Manifest to docker.stackable.tech
111-
uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
112-
with:
113-
image-registry-uri: docker.stackable.tech
114-
image-registry-username: github
115-
image-registry-password: ${{ secrets.NEXUS_PASSWORD }}
116-
image-repository: stackable/${{ env.PRODUCT_NAME }}
117-
image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }}
118-
119-
- name: Publish and Sign Image Index Manifest to oci.stackable.tech
120-
uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
121-
with:
122-
image-registry-uri: oci.stackable.tech
123-
image-registry-username: robot$sdp+github-action-build
124-
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
125-
image-repository: sdp/${{ env.PRODUCT_NAME }}
126-
image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }}
127-
128-
notify:
129-
name: Failure Notification
130-
needs: [generate_matrix, build, publish_manifests]
131-
runs-on: ubuntu-latest
132-
if: failure()
133-
steps:
134-
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
135-
with:
136-
channel-id: "C07UG6JH44F" # notifications-container-images
137-
payload: |
138-
{
139-
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
140-
"attachments": [
141-
{
142-
"pretext": "See the details below for a summary of which job(s) failed.",
143-
"color": "#aa0000",
144-
"fields": [
145-
{
146-
"title": "Generate Version List",
147-
"short": true,
148-
"value": "${{ needs.generate_matrix.result }}"
149-
},
150-
{
151-
"title": "Build/Publish Image",
152-
"short": true,
153-
"value": "${{ needs.build.result }}"
154-
},
155-
{
156-
"title": "Build/Publish Manifests",
157-
"short": true,
158-
"value": "${{ needs.publish_manifests.result }}"
159-
}
160-
],
161-
"actions": [
162-
{
163-
"type": "button",
164-
"text": "Go to workflow run",
165-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
166-
}
167-
]
168-
}
169-
]
170-
}
171-
env:
172-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
26+
build_image:
27+
name: Reusable Workflow
28+
uses: ./.github/workflows/reusable_build_image.yaml
29+
secrets:
30+
harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
31+
slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
32+
with:
33+
product-name: druid
34+
sdp-version: ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}

0 commit comments

Comments
 (0)