generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 20
129 lines (118 loc) · 4.67 KB
/
_build.yaml
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
name: build
on:
workflow_call:
inputs:
tag:
description: "Additional tag for built images"
required: false
type: string
default: ""
purpose:
description: "Purpose of the build (dev - for pull/push, empty - for release)"
required: false
type: string
default: ""
img_directory:
description: "Directory of the image (dev/prod)"
required: false
type: string
default: ""
img_version:
description: "Version of the image"
required: false
type: string
default: ""
jobs:
compute-tags:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.get_tag.outputs.TAGS }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- if: ${{ !startsWith(github.event_name, 'pull_request') }}
name: Get the latest tag
id: get_tag
run: |
{
echo 'TAGS<<EOF'
echo "${{ github.sha }}"
echo "${{ github.ref_name}}"
echo "${{ inputs.tag }}"
echo EOF
} >> "$GITHUB_OUTPUT"
build-operator:
needs: compute-tags
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: serverless-operator
dockerfile: components/operator/Dockerfile
tags: ${{ needs.compute-tags.outputs.tags }}
build-args: |
PURPOSE=${{ inputs.purpose }}
IMG_DIRECTORY=${{ inputs.img_directory }}
IMG_VERSION=${{ inputs.img_version }}
# https://github.com/kyma-project/serverless/issues/998#issuecomment-2191556454
# build-gitserver:
# uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
# with:
# name: gitserver
# dockerfile: Dockerfile
# context: tests/gitserver
# tags: ${{ needs.compute-tags.outputs.tags }}
build-serverless-controller:
needs: compute-tags
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-controller
dockerfile: components/serverless/deploy/manager/Dockerfile
tags: ${{ needs.compute-tags.outputs.tags }}
build-buildless-serverless-controller:
needs: compute-tags
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-buildless-controller
dockerfile: Dockerfile
context: components/buildless-serverless
tags: ${{ needs.compute-tags.outputs.tags }}
build-serverless-webhook:
needs: compute-tags
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-webhook
dockerfile: components/serverless/deploy/webhook/Dockerfile
tags: ${{ needs.compute-tags.outputs.tags }}
build-serverless-jobinit:
needs: compute-tags
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-build-init
dockerfile: components/serverless/deploy/jobinit/Dockerfile
tags: ${{ needs.compute-tags.outputs.tags }}
build-nodejs20:
needs: compute-tags
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-nodejs20
dockerfile: nodejs20/Dockerfile
context: components/runtimes/nodejs
tags: ${{ needs.compute-tags.outputs.tags }}
build-nodejs22:
needs: compute-tags
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-nodejs22
dockerfile: nodejs22/Dockerfile
context: components/runtimes/nodejs
tags: ${{ needs.compute-tags.outputs.tags }}
build-python312:
needs: compute-tags
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-python312
dockerfile: python312/Dockerfile
context: components/runtimes/python
tags: ${{ needs.compute-tags.outputs.tags }}