forked from feldera/feldera
-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (116 loc) · 4.97 KB
/
Copy pathcontainers.yml
File metadata and controls
128 lines (116 loc) · 4.97 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
name: Build release images
on:
schedule:
- cron: '0 0 * * *'
release:
types: [published]
workflow_dispatch:
env:
REGISTRY: ghcr.io
PIPELINE_MANAGER_IMAGE: ghcr.io/${{ github.repository_owner }}/pipeline-manager
jobs:
build-and-push-image:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- runner: [self-hosted, skylake40]
os: linux
arch: amd64
- runner: blacksmith-8vcpu-ubuntu-2204-arm
os: linux
arch: arm64
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Docker meta (pipeline-manager)
id: meta_pipeline_manager
uses: docker/metadata-action@v5
with:
images: ${{ env.PIPELINE_MANAGER_IMAGE }}
tags: |
type=semver,pattern={{version}}
type=raw,value=latest
# Single image description
labels: |
org.opencontainers.image.description=The Pipeline Manager lets you create and run pipelines inside Feldera instance
# Multiarch manifest description
annotations: |
org.opencontainers.image.description=The Pipeline Manager lets you create and run pipelines inside Feldera instance
- name: Run standard demo that checks a couple endpoints are reachable
run: |
RUST_LOG=debug,tokio_postgres=info docker compose -f deploy/docker-compose.yml \
-f deploy/docker-compose-dev.yml \
-f deploy/docker-compose-extra.yml \
-f deploy/docker-compose-demo.yml \
--profile demo-standard up --build --force-recreate \
--exit-code-from demo-standard --renew-anon-volumes
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push pipeline-manager image
id: build_pipeline_manager
uses: docker/build-push-action@v6
with:
context: .
platforms: ${{matrix.os}}/${{matrix.arch}}
file: deploy/Dockerfile
push: true
tags: ${{ steps.meta_pipeline_manager.outputs.tags }}
labels: ${{ steps.meta_pipeline_manager.outputs.labels }}
annotations: ${{ steps.meta_pipeline_manager.outputs.annotations }}
- name: Export multiarch image digest
id: export_image_digest
run: |
echo "digest-pipeline-manager-${{matrix.os}}-${{matrix.arch}}=${{ steps.build_pipeline_manager.outputs.digest }}" >> $GITHUB_OUTPUT
# - uses: actions/delete-package-versions@v4
# with:
# package-name: pipeline-manager
# package-type: 'container'
# min-versions-to-keep: 5
# delete-only-untagged-versions: 'true'
outputs:
digest-pipeline-manager-linux-amd64: ${{ steps.export_image_digest.outputs.digest-pipeline-manager-linux-amd64 }}
digest-pipeline-manager-linux-arm64: ${{ steps.export_image_digest.outputs.digest-pipeline-manager-linux-arm64 }}
push-docker-manifest:
needs: build-and-push-image
runs-on: blacksmith-2vcpu-ubuntu-2204-arm
permissions:
contents: read
packages: write
steps:
- name: Docker meta
id: meta_pipeline_manager
uses: docker/metadata-action@v5
with:
images: |
${{ env.PIPELINE_MANAGER_IMAGE }}
tags: |
type=semver,pattern={{version}}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push latest manifest
run: |
docker manifest create ${{ env.PIPELINE_MANAGER_IMAGE }} \
${{ env.PIPELINE_MANAGER_IMAGE }}@${{needs.build-and-push-image.outputs.digest-pipeline-manager-linux-amd64}} \
${{ env.PIPELINE_MANAGER_IMAGE }}@${{needs.build-and-push-image.outputs.digest-pipeline-manager-linux-arm64}}
docker manifest push ${{ env.PIPELINE_MANAGER_IMAGE }}:latest
- name: Push versioned manifest
if: github.event_name == 'release'
run: |
docker manifest create ${{ env.PIPELINE_MANAGER_IMAGE }} \
${{ env.PIPELINE_MANAGER_IMAGE }}@${{needs.build-and-push-image.outputs.digest-pipeline-manager-linux-amd64}} \
${{ env.PIPELINE_MANAGER_IMAGE }}@${{needs.build-and-push-image.outputs.digest-pipeline-manager-linux-arm64}}
docker manifest push ${{ env.PIPELINE_MANAGER_IMAGE }}:${{ github.event.release.tag_name }}