-
Notifications
You must be signed in to change notification settings - Fork 23
125 lines (112 loc) · 3.94 KB
/
main.yml
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
name: CI
on:
push:
branches:
- develop
pull_request:
branches:
- develop
types:
- opened
- reopened
- synchronize
- labeled
workflow_dispatch:
env:
TEST_CLUSTER_NAME: activiti
CHART_DIR: "charts/activiti-cloud-full-example"
jobs:
check-ext-build:
name: Check dependabot/external build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Activiti/Activiti/.github/actions/[email protected]
pre-commit:
needs: check-ext-build
runs-on: ubuntu-latest
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: bridgecrewio/[email protected]
with:
framework: kubernetes
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
build:
runs-on: ubuntu-latest
needs: pre-commit
steps:
- uses: actions/checkout@v4
- name: Build
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
chart-dir: ${{ env.CHART_DIR }}
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
id: resolve-preview
- name: Execute helm dry run
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
chart-dir: ${{ env.CHART_DIR }}
test-rancher-url: ${{ secrets.RANCHER2_URL }}
test-rancher-access-key: ${{ secrets.RANCHER2_ACCESS_KEY }}
test-rancher-secret-key: ${{ secrets.RANCHER2_SECRET_KEY }}
test-cluster-name: ${{ env.TEST_CLUSTER_NAME }}
test-namespace: ${{ steps.resolve-preview.outputs.preview-name }}
parse-next-release:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push'
outputs:
next-release: ${{ steps.parse-next-release.outputs.next-release }}
steps:
- uses: actions/checkout@v4
- name: Parse next release
id: parse-next-release
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
chart-dir: ${{ env.CHART_DIR }}
publish:
needs: parse-next-release
if: github.event_name == 'push'
uses: Alfresco/alfresco-build-tools/.github/workflows/[email protected]
with:
next-version: ${{ needs.parse-next-release.outputs.next-release }}
chart-dir: charts/activiti-cloud-full-example
helm-charts-repo: Activiti/activiti-cloud-helm-charts
helm-charts-repo-branch: gh-pages
secrets: inherit
promote:
if: github.event_name == 'push'
needs:
- publish
runs-on: ubuntu-latest
env:
VERSION: ${{ needs.publish.outputs.version }}
DEVELOPMENT_BRANCH: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v4
- run: echo ACTIVITI_CLOUD_APPLICATION_VERSION=`yq .runtime-bundle.image.tag charts/activiti-cloud-full-example/values.yaml` >> $GITHUB_ENV
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
with:
version: ${{ env.VERSION }}
auto-merge: 'true'
labels: ${{ env.DEVELOPMENT_BRANCH }}
base-branch-name: ${{ env.DEVELOPMENT_BRANCH }}
git-username: ${{ secrets.BOT_GITHUB_USERNAME }}
git-token: ${{ secrets.BOT_GITHUB_TOKEN }}
git-author-name: ${{ secrets.BOT_GITHUB_USERNAME }}
notify:
runs-on: ubuntu-latest
needs:
- build
- publish
- promote
if: always() && failure() && github.event_name == 'push'
steps:
- name: Slack Notification
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
channel-id: 'eng-hxp-studio-activiti-gh-notifs'
token: ${{ secrets.SLACK_NOTIFICATION_BOT_TOKEN }}