Skip to content

Commit 48be107

Browse files
User Defined Functions tutorial (#55)
Add UDF tutorial and example code and container image Co-authored-by: Thomas Cooper <[email protected]>
1 parent 8341211 commit 48be107

File tree

14 files changed

+1135
-7
lines changed

14 files changed

+1135
-7
lines changed

.github/workflows/integration.yaml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,31 @@ jobs:
4141
username: "${{ secrets.IMAGE_REPO_USERNAME }}"
4242
password: "${{ secrets.IMAGE_REPO_PASSWORD }}"
4343

44-
- name: Build Image
44+
- name: Generate Currency Converter Dockerfile
45+
working-directory: tutorials/currency-converter
46+
run: mvn -B docker:build -Ddocker.buildArchiveOnly # Skip building image, just create Dockerfile
47+
48+
- name: Build Data Generator Image
4549
if: github.event_name != 'push'
4650
uses: docker/build-push-action@v6
4751
with:
4852
context: tutorials/data-generator/
4953
platforms: linux/amd64,linux/arm64
5054
push: false
5155
file: tutorials/data-generator/Dockerfile
56+
57+
- name: Build Currency Converter Image
58+
if: github.event_name != 'push'
59+
uses: docker/build-push-action@v6
60+
with:
61+
context: tutorials/currency-converter/target/docker/flink-sql-runner-with-flink-udf-currency-converter/build/
62+
platforms: linux/amd64,linux/arm64
63+
push: false
64+
file: tutorials/currency-converter/target/docker/flink-sql-runner-with-flink-udf-currency-converter/build/Dockerfile
5265

53-
- name: Image metadata
66+
- name: Data Generator Image metadata
5467
if: github.event_name == 'push'
55-
id: meta
68+
id: data_generator_meta
5669
uses: docker/metadata-action@v5
5770
with:
5871
images: |
@@ -65,13 +78,39 @@ jobs:
6578
prefix=
6679
suffix=
6780
68-
- name: Build and Push Image
81+
- name: Currency Converter Image metadata
82+
if: github.event_name == 'push'
83+
id: currency_converter_meta
84+
uses: docker/metadata-action@v5
85+
with:
86+
images: |
87+
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/flink-sql-runner-with-flink-udf-currency-converter
88+
tags: |
89+
type=ref,event=branch
90+
type=ref,event=tag
91+
flavor: |
92+
latest=false
93+
prefix=
94+
suffix=
95+
96+
- name: Build and Push Data Generator Image
6997
if: github.event_name == 'push'
7098
uses: docker/build-push-action@v6
7199
with:
72100
context: tutorials/data-generator/
73101
platforms: linux/amd64,linux/arm64
74102
push: true
75103
file: tutorials/data-generator/Dockerfile
76-
tags: ${{ steps.meta.outputs.tags }}
77-
labels: ${{ steps.meta.outputs.labels }}
104+
tags: ${{ steps.data_generator_meta.outputs.tags }}
105+
labels: ${{ steps.data_generator_meta.outputs.labels }}
106+
107+
- name: Build and Push Currency Converter Image
108+
if: github.event_name == 'push'
109+
uses: docker/build-push-action@v6
110+
with:
111+
context: tutorials/currency-converter/target/docker/flink-sql-runner-with-flink-udf-currency-converter/build/
112+
platforms: linux/amd64,linux/arm64
113+
push: true
114+
file: tutorials/currency-converter/target/docker/flink-sql-runner-with-flink-udf-currency-converter/build/Dockerfile
115+
tags: ${{ steps.currency_converter_meta.outputs.tags }}
116+
labels: ${{ steps.currency_converter_meta.outputs.labels }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ dependency-reduced-pom.xml
3131

3232
# Rendered Docs
3333
*.html
34+
35+
# Maven Wrapper files
36+
.mvn

0 commit comments

Comments
 (0)