-
Notifications
You must be signed in to change notification settings - Fork 223
130 lines (128 loc) · 4.66 KB
/
Copy pathbuild-test-and-publish-ce.yml
File metadata and controls
130 lines (128 loc) · 4.66 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
# Effective 2026-04-24, we no longer publish images to a public Docker Hub.
name: Build, test, and publish CE
on: [pull_request, push, workflow_dispatch]
jobs:
build-and-test:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
DISTRO: [tomcat, wildfly, run]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Import Secrets
id: secrets
uses: hashicorp/vault-action@v3.4.0
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
exportEnv: false
secrets: |
secret/data/products/cambpm/ci/nexus USER | NEXUS_USER;
secret/data/products/cambpm/ci/nexus PASSWORD | NEXUS_PASS;
secret/data/products/cambpm/ci/harbor username | HARBOR_USERNAME;
secret/data/products/cambpm/ci/harbor password | HARBOR_PASSWORD;
- name: Login to Harbor
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: registry.camunda.cloud
username: ${{ steps.secrets.outputs.HARBOR_USERNAME }}
password: ${{ steps.secrets.outputs.HARBOR_PASSWORD }}
- name: Build
run: ./pipeline.sh
env:
DISTRO: ${{ matrix.DISTRO }}
EE: false
NEXUS_PASS: ${{ steps.secrets.outputs.NEXUS_PASS }}
NEXUS_USER: ${{ steps.secrets.outputs.NEXUS_USER }}
PUSH_REGISTRY: ${{ github.event_name != 'pull_request' && 'registry.camunda.cloud/team-cambpm' || '' }}
- name: Test
run: ./test.sh
working-directory: test
env:
DISTRO: ${{ matrix.DISTRO }}
EE: false
build-and-test-arm:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: aws-arm-core-4-default
strategy:
fail-fast: false
matrix:
DISTRO: [tomcat, wildfly, run]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Import Secrets
id: secrets
uses: hashicorp/vault-action@v3.4.0
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
exportEnv: false
secrets: |
secret/data/products/cambpm/ci/nexus USER | NEXUS_USER;
secret/data/products/cambpm/ci/nexus PASSWORD | NEXUS_PASS;
secret/data/products/cambpm/ci/harbor username | HARBOR_USERNAME;
secret/data/products/cambpm/ci/harbor password | HARBOR_PASSWORD;
- name: Login to Harbor
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: registry.camunda.cloud
username: ${{ steps.secrets.outputs.HARBOR_USERNAME }}
password: ${{ steps.secrets.outputs.HARBOR_PASSWORD }}
- name: Build
run: ./pipeline.sh
env:
DISTRO: ${{ matrix.DISTRO }}
EE: false
NEXUS_PASS: ${{ steps.secrets.outputs.NEXUS_PASS }}
NEXUS_USER: ${{ steps.secrets.outputs.NEXUS_USER }}
PUSH_REGISTRY: ${{ github.event_name != 'pull_request' && 'registry.camunda.cloud/team-cambpm' || '' }}
- name: Test
run: ./test.sh
working-directory: test
env:
DISTRO: ${{ matrix.DISTRO }}
EE: false
create-manifests-ce:
if: github.event_name != 'pull_request'
needs: [build-and-test, build-and-test-arm]
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
DISTRO: [tomcat, wildfly, run]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Import Secrets
id: secrets
uses: hashicorp/vault-action@v3.4.0
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
exportEnv: false
secrets: |
secret/data/products/cambpm/ci/harbor username | HARBOR_USERNAME;
secret/data/products/cambpm/ci/harbor password | HARBOR_PASSWORD;
- name: Login to Harbor
uses: docker/login-action@v3
with:
registry: registry.camunda.cloud
username: ${{ steps.secrets.outputs.HARBOR_USERNAME }}
password: ${{ steps.secrets.outputs.HARBOR_PASSWORD }}
- name: Create multi-arch manifests
run: ./create-manifests.sh
env:
DISTRO: ${{ matrix.DISTRO }}
EE: false
PUSH_REGISTRY: registry.camunda.cloud/team-cambpm