forked from EnMasseProject/enmasse
-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (99 loc) · 3.18 KB
/
release.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
name: Release job
env:
TAG: "latest"
DOCKER_ORG: enmasse
KUBERNETES_NAMESPACE: "enmasse-infra"
REGISTRY_USER: "enmasse+ci"
on:
push:
tags:
- '0.*'
jobs:
smoke:
name: Smoke tests and Release
env:
DOCKER_REGISTRY: "quay.io"
TAG: "latest"
RELEASE: true
PUSH_REGISTRY: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Clean disk
run: ./.github/scripts/clean_disk.sh
- name: Set version and tag
id: version
run: |
echo "::set-env name=VERSION::$(grep "release.version" pom.properties| cut -d'=' -f2)"
echo "::set-output name=VERSION::$(grep "release.version" pom.properties| cut -d'=' -f2)"
echo "::set-env name=TAG::$(grep "maven.version" pom.properties| cut -d'=' -f2)"
echo "::set-output name=TAG::$(grep "maven.version" pom.properties| cut -d'=' -f2)"
- name: Install dependencies
run: ./.github/scripts/install_dep.sh
- uses: actions/setup-go@v2
with:
go-version: '1.13.1'
- run: go version
- name: setup-docker
run: ./.github/scripts/setup_docker.sh
- name: Minikube setup with registry
uses: EnMasseProject/[email protected]
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11.0.2
- name: Setup OLM
run: ./.github/scripts/setup-olm.sh
- name: Build
id: build
run: |
export REGISTRY_PASS=${{ secrets.REGISTRY_PASS }}
./.github/scripts/build.sh
- name: Smoke tests
run: ./.github/scripts/smoke_test.sh
- name: OLM tests
run: ./.github/scripts/olm_test.sh
- name: Collect logs
if: failure()
run: ./.github/scripts/collectLogs.sh
- name: Upload artifacts
if: failure()
uses: actions/[email protected]
with:
name: smoke-test-logs
path: test-logs.zip
- name: Create Release
if: job.status == 'success'
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Set asset path
if: job.status == 'success'
run: |
echo "::set-env name=ASSETPATH::templates/build/enmasse-$(echo $TAG).tgz"
echo "::set-env name=ASSETNAME::enmasse-$(echo $TAG).tgz"
- name: Upload Release Asset
if: job.status == 'success'
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.ASSETPATH }}
asset_name: ${{ env.ASSETNAME }}
asset_content_type: application/gzip
- name: Publish documentation
env:
FROM: .
TO: website
CI_TOKEN: ${{ secrets.CI_TOKEN }}
run: ./.github/scripts/publish_docs.sh