Skip to content

Commit 79b0146

Browse files
authored
Merge pull request #20 from linuxfoundation/ems/meltano-containers
Support meltano container build [LFXV2-870]
2 parents 4c26c13 + c2fa2a3 commit 79b0146

File tree

19 files changed

+1261
-490
lines changed

19 files changed

+1261
-490
lines changed

.dockerignore

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
.git
55
.gitignore
66
.dockerignore
7-
/bin/
8-
*.sh
9-
*.pem
10-
.env
11-
*.env
7+
**/bin
128

139
# Helm chart dependencies
14-
/charts/*/charts/
15-
*.tgz
10+
charts/*/charts
11+
**/*.tgz
1612

1713
# Local and temporary files
18-
.DS_Store
19-
.idea/
20-
.vscode/
21-
*.swp
22-
*~
14+
**/.DS_Store
15+
.idea
16+
.vscode
17+
**/*.swp
18+
**/*.out
19+
**/*~
20+
**/*.pem
21+
**/.env
22+
**/*.env
2323

2424
# Rendered templates
2525
**/templates/*.rendered
@@ -30,19 +30,27 @@
3030
/megalinter-reports/
3131

3232
# Python environment for meltano
33-
.venv/
34-
__pycache__/
35-
.mypy_cache/
36-
.ruff_cache/
33+
**/.venv
34+
**/venv
35+
**/.meltano
36+
**/__pycache__
37+
**/.mypy_cache
38+
**/.ruff_cache
39+
40+
# More potential Meltano paths
41+
meltano/ui.cfg
42+
meltano/output
43+
meltano/transform/target
44+
meltano/transform/dbt_modules
45+
meltano/transform/logs
3746

3847
# Documentation
39-
README.md
40-
*.md
48+
**/README.md
49+
**/*.md
4150
LICENSE*
4251

4352
# Test files
44-
*_test.go
45-
testdata/
53+
**/*_test.go
4654

4755
# Development files
4856
Makefile

.github/workflows/mega-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: MegaLinter
3434
id: ml
3535
# Use the Cupcake flavor (Go and Python).
36-
uses: oxsecurity/megalinter/flavors/cupcake@5a91fb06c83d0e69fbd23756d47438aa723b4a5a # 8.7.0
36+
uses: oxsecurity/megalinter/flavors/cupcake@62c799d895af9bcbca5eacfebca29d527f125a57 # 9.1.0
3737
env:
3838
# All available variables are described in documentation
3939
# https://megalinter.io/latest/configuration/
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ permissions:
1313
contents: read
1414

1515
jobs:
16-
publish:
17-
name: Publish Main
16+
publish-v1-sync-helper:
17+
name: Publish v1-sync-helper Main
1818
runs-on: ubuntu-latest
1919
permissions:
2020
contents: read
Lines changed: 100 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright The Linux Foundation and each contributor to LFX.
22
# SPDX-License-Identifier: MIT
33
---
4-
name: Publish Tagged Release
4+
name: Publish Release
55

66
"on":
77
push:
@@ -10,14 +10,15 @@ name: Publish Tagged Release
1010

1111
env:
1212
COSIGN_VERSION: v3.0.2
13-
HELM_VERSION: 4.0.1
13+
HELM_VERSION: 4.0.4
14+
DOCKER_REGISTRY: ghcr.io/linuxfoundation/lfx-v1-sync-helper
1415

1516
permissions:
1617
contents: read
1718

1819
jobs:
19-
publish:
20-
name: Publish Tagged Release
20+
publish-v1-sync-helper:
21+
name: Publish v1-sync-helper Tagged Release
2122
runs-on: ubuntu-latest
2223
permissions:
2324
contents: read
@@ -62,8 +63,80 @@ jobs:
6263
-t latest \
6364
--sbom spdx
6465
66+
publish-meltano:
67+
name: Publish Meltano Tagged Release
68+
runs-on: ubuntu-latest
69+
needs: [publish-v1-sync-helper]
70+
permissions:
71+
contents: read
72+
packages: write
73+
id-token: write
74+
outputs:
75+
image_name: ${{ steps.build.outputs.image_name }}
76+
digest: ${{ steps.build.outputs.digest }}
77+
app_version: ${{ steps.prepare.outputs.app_version }}
78+
steps:
79+
- name: Checkout repository
80+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
81+
82+
- name: Prepare versions
83+
id: prepare
84+
run: |
85+
set -euo pipefail
86+
APP_VERSION=$(echo ${{ github.ref_name }} | sed 's/v//g')
87+
echo "app_version=$APP_VERSION" >> "$GITHUB_OUTPUT"
88+
89+
- name: Set up Docker Buildx
90+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
91+
92+
- name: Login to GitHub Container Registry
93+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
94+
with:
95+
registry: ghcr.io
96+
username: ${{ github.actor }}
97+
password: ${{ secrets.GITHUB_TOKEN }}
98+
99+
- name: Extract metadata
100+
id: meta
101+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
102+
with:
103+
images: ${{ env.DOCKER_REGISTRY }}/meltano
104+
tags: |
105+
type=ref,event=tag
106+
type=semver,pattern={{version}}
107+
type=raw,value=latest
108+
109+
- name: Build and push Meltano Docker image
110+
id: build
111+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
112+
with:
113+
context: .
114+
file: docker/Dockerfile.meltano
115+
platforms: linux/amd64
116+
push: true
117+
tags: ${{ steps.meta.outputs.tags }}
118+
labels: ${{ steps.meta.outputs.labels }}
119+
cache-from: type=gha
120+
cache-to: type=gha,mode=max
121+
provenance: mode=max
122+
sbom: true
123+
124+
- name: Install Cosign
125+
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
126+
with:
127+
cosign-release: "${{ env.COSIGN_VERSION }}"
128+
129+
- name: Sign the Meltano container image
130+
env:
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132+
run: |
133+
set -euo pipefail
134+
cosign sign --yes '${{ env.DOCKER_REGISTRY }}/meltano@${{ steps.build.outputs.digest }}'
135+
65136
release-helm-chart:
66-
needs: publish
137+
needs:
138+
- publish-v1-sync-helper
139+
- publish-meltano
67140
runs-on: ubuntu-24.04
68141
permissions:
69142
contents: write
@@ -81,10 +154,10 @@ jobs:
81154
uses: >- # main
82155
linuxfoundation/lfx-public-workflows/.github/actions/helm-chart-oci-publisher@c465d6571fa0b8be9d551d902955164ea04a00af
83156
with:
84-
name: ${{ needs.publish.outputs.chart_name }}
157+
name: ${{ needs.publish-v1-sync-helper.outputs.chart_name }}
85158
repository: ${{ github.repository }}/chart
86-
chart_version: ${{ needs.publish.outputs.chart_version }}
87-
app_version: ${{ needs.publish.outputs.app_version }}
159+
chart_version: ${{ needs.publish-v1-sync-helper.outputs.chart_version }}
160+
app_version: ${{ needs.publish-v1-sync-helper.outputs.app_version }}
88161
helm_version: "${{ env.HELM_VERSION }}"
89162
registry: ghcr.io
90163
registry_username: ${{ github.actor }}
@@ -96,7 +169,7 @@ jobs:
96169
cosign-release: "${{ env.COSIGN_VERSION }}"
97170

98171
- name: Login to GitHub
99-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
172+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
100173
with:
101174
registry: ghcr.io
102175
username: ${{ github.actor }}
@@ -126,3 +199,21 @@ jobs:
126199
registry-username: ${{ github.actor }}
127200
secrets:
128201
registry-password: ${{ secrets.GITHUB_TOKEN }}
202+
203+
create-meltano-provenance:
204+
needs:
205+
- publish-meltano
206+
permissions:
207+
actions: read
208+
id-token: write
209+
packages: write
210+
# Note, this action *cannot* be pinned to a ref: see the project's
211+
# explanation at "Referencing SLSA builders and generators" in their
212+
# README.
213+
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
214+
with:
215+
image: ${{ needs.publish-meltano.outputs.image_name }}
216+
digest: ${{ needs.publish-meltano.outputs.digest }}
217+
registry-username: ${{ github.actor }}
218+
secrets:
219+
registry-password: ${{ secrets.GITHUB_TOKEN }}

.lycheeignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Ignore local Kubernetes paths.
2-
^https?://[a-zA-Z0-9.-]+\.svc\.cluster\.local
2+
^(https?|nats)://[a-zA-Z0-9.-]+\.svc\.cluster\.local

.secretlintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
meltano/plugins/*/*.lock

0 commit comments

Comments
 (0)