-
Notifications
You must be signed in to change notification settings - Fork 145
138 lines (119 loc) · 4.51 KB
/
Copy pathcontainers.yml
File metadata and controls
138 lines (119 loc) · 4.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
on:
schedule:
- cron: '0 0 * * *'
release:
types: [published]
workflow_dispatch:
env:
REGISTRY: ghcr.io
PIPELINE_MANAGER_IMAGE: ghcr.io/${{ github.repository_owner }}/pipeline-manager
DEMO_IMAGE: ghcr.io/${{ github.repository_owner }}/demo-container
KAFKA_CONNECT_IMAGE: ghcr.io/${{ github.repository_owner }}/kafka-connect
jobs:
build-and-push-image:
runs-on: [self-hosted, skylake40]
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
- name: MUIX license
run: echo "NEXT_PUBLIC_MUIX_PRO_KEY=${muix_license}" > web-console/.env && cat web-console/.env
env:
muix_license: ${{ secrets.muix_license }}
- name: Docker meta (pipeline-manager)
id: meta_pipeline_manager
uses: docker/metadata-action@v4
with:
images: ${{ env.PIPELINE_MANAGER_IMAGE }}
tags: |
type=semver,pattern={{version}}
- name: Docker meta (demo-container)
id: meta_demo
uses: docker/metadata-action@v4
with:
images: ${{ env.DEMO_IMAGE }}
tags: |
type=semver,pattern={{version}}
- name: Docker meta (kafka-connect)
id: meta_kafka_connect
uses: docker/metadata-action@v4
with:
images: ${{ env.KAFKA_CONNECT_IMAGE }}
tags: |
type=semver,pattern={{version}}
- name: Build Kafka Connect container
run: |
cd deploy && \
docker build --target kafka-connect -t ${{ env.KAFKA_CONNECT_IMAGE }} .
- name: Run integration tests
run: |
cd deploy && \
SECOPS_DEMO_ARGS="--prepare-args 500000" RUST_LOG=debug,tokio_postgres=info docker compose -f docker-compose.yml -f docker-compose-dev.yml --profile demo up --build --force-recreate --exit-code-from demo --renew-anon-volumes
# Disable until we bring the Kubernetes workflows up to speed
#
# - uses: engineerd/setup-kind@v0.5.0
# with:
# version: "v0.11.1"
# skipClusterCreation: "true"
# - name: Set up kind
# run: cd deploy/kind && ./setup.sh && ./setup.sh
# - name: Deploy DBSP
# run: cd deploy/kind && sleep 60 && kubectl apply -f dbsp-deploy.yml && kubectl wait --for=condition=ready pod -l app=dbsp -n dbsp --timeout=300s
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Push untagged images when the workflow is not triggered by a release
- name: Push containers
if: github.event_name != 'release'
run: docker push ${{ env.PIPELINE_MANAGER_IMAGE }} && docker push ${{ env.DEMO_IMAGE }} && docker push ${{ env.KAFKA_CONNECT_IMAGE }}
# Tagged DBSP image
- name: Push (pipeline-manager)
uses: docker/build-push-action@v4
if: github.event_name == 'release'
with:
context: .
file: deploy/Dockerfile
push: true
tags: ${{ steps.meta_pipeline_manager.outputs.tags }}
labels: ${{ steps.meta_pipeline_manager.outputs.labels }}
# Tagged demo image
- name: Push (demo-container)
uses: docker/build-push-action@v4
if: github.event_name == 'release'
with:
context: .
file: deploy/Dockerfile
target: client
push: true
tags: ${{ steps.meta_demo.outputs.tags }}
labels: ${{ steps.meta_demo.outputs.labels }}
# Tagged Kafka Connect image
- name: Push (kafka-connect)
uses: docker/build-push-action@v4
if: github.event_name == 'release'
with:
context: .
file: deploy/Dockerfile
target: kafka-connect
push: true
tags: ${{ steps.meta_kafka_connect.outputs.tags }}
labels: ${{ steps.meta_kafka_connect.outputs.labels }}
- uses: actions/delete-package-versions@v4
with:
package-name: pipeline-manager
package-type: 'container'
min-versions-to-keep: 5
delete-only-untagged-versions: 'true'
- uses: actions/delete-package-versions@v4
with:
package-name: demo-container
package-type: 'container'
min-versions-to-keep: 5
delete-only-untagged-versions: 'true'