forked from elastic/apm-agent-php
-
Notifications
You must be signed in to change notification settings - Fork 3
119 lines (105 loc) · 3.72 KB
/
release.yml
File metadata and controls
119 lines (105 loc) · 3.72 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
---
name: release
permissions:
contents: read
on:
workflow_dispatch:
### TODO: listen for tags, so for now let's test whether it works in dry run mode by default
#create:
# tags: [ "v*" ]
jobs:
build:
name: build-agent-library
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
arch:
- "linux-x86-64"
- "linuxmusl-x86-64"
env:
BUILD_ARCHITECTURE: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v3
- name: Build
run: make -f .ci/Makefile build
- uses: actions/upload-artifact@v3
with:
name: package-parts-${{ matrix.arch }}
path: |
agent/native/_build/${{ matrix.arch }}-release/ext/elastic_apm*.so
agent/native/_build/${{ matrix.arch }}-release/ext/elastic_apm*.debug
build-packages:
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: package-parts-linux-x86-64
path: agent/native/_build/linux-x86-64-release/ext
- uses: actions/download-artifact@v3
with:
name: package-parts-linuxmusl-x86-64
path: agent/native/_build/linuxmusl-x86-64-release/ext
- name: package
run: make -C packaging package
- name: package info
run: make -C packaging info
- uses: actions/upload-artifact@v3
with:
name: package
path: |
build/packages/*
!build/packages/**/*.sha512
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: package
path: build/packages
- run: echo "Upload artifacts to gs://internal-ci-artifacts/apm-agent-php/<TAG>"
- id: buildkite
name: Run Release
uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: apm-agent-php-release
waitFor: true
printBuildLogs: true
buildEnvVars: |
dry_run=true
- run: echo "Download artifacts from gs://internal-ci-artifacts/apm-agent-php/<TAG>/signed-artifacts"
- run: echo "Run tests"
- run: echo "here is no approval input"
- run: echo "Publish draft release"
- run: echo "Verify draft release checksum"
- run: echo "Publish release (draft -> regular)"
- if: ${{ success() }}
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
#channel: "#apm-agent-php"
channel: "#on-week-oblt-productivity"
message: |
:runner: [${{ github.repository }}] Release *${{ github.ref_name }}* has been triggered in Buildkite: (<${{ steps.buildkite.outputs.build }}|build>)
- if: ${{ failure() }}
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
#channel: "#apm-agent-php"
channel: "#on-week-oblt-productivity"
message: |
:ghost: [${{ github.repository }}] Release *${{ github.ref_name }}* didn't get triggered in Buildkite.
Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>)