forked from Azure/aks-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (112 loc) · 4.76 KB
/
create-release-branch.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
name: Create Release Branch
on:
workflow_dispatch:
inputs:
release_version:
description: 'Which version are we creating a release branch for?'
required: true
from_branch:
description: 'Which branch to source release branch from? (default: master)'
required: false
default: 'master'
jobs:
create-release-branch:
runs-on: ubuntu-latest
steps:
- name: validate version
run: echo "${{github.event.inputs.release_version}}" | grep -E 'v[0-9]+\.[0-9]+\.[0-9]+$'
- uses: actions/checkout@v2
with:
ref: ${{github.event.inputs.from_branch}}
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
- name: install go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Install helm
run: |
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
sudo apt-get install apt-transport-https --yes
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
- name: Install k
run: |
sudo curl -o /usr/local/bin/k https://raw.githubusercontent.com/jakepearson/k/master/k
sudo chmod +x /usr/local/bin/k
- name: Build aks-engine binary
run: make build-binary
- name: Validate gpu + docker scenario
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
ORCHESTRATOR_RELEASE: "1.23"
CLUSTER_DEFINITION: "examples/kubernetes-gpu/kubernetes.json"
GINKGO_FOCUS: "should be able to run a nvidia-gpu job"
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }}
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }}
LOCATION: "westus2"
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
CLEANUP_ON_EXIT: true
CLEANUP_IF_FAIL: true
CONTAINER_RUNTIME: "docker"
SKIP_LOGS_COLLECTION: true
AZURE_CORE_ONLY_SHOW_ERRORS: True
BLOCK_SSH: true
run: make test-kubernetes
- name: Validate gpu + containerd scenario
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
ORCHESTRATOR_RELEASE: "1.23"
CLUSTER_DEFINITION: "examples/kubernetes-gpu/kubernetes.json"
GINKGO_FOCUS: "should be able to run a nvidia-gpu job"
SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }}
CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }}
CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }}
LOCATION: "westus2"
TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }}
CLEANUP_ON_EXIT: true
CLEANUP_IF_FAIL: true
CONTAINER_RUNTIME: "containerd"
SKIP_LOGS_COLLECTION: true
AZURE_CORE_ONLY_SHOW_ERRORS: True
BLOCK_SSH: true
run: make test-kubernetes
- name: create branch
run: |
git remote -v
git checkout -b release-${{github.event.inputs.release_version}}
git push origin release-${{github.event.inputs.release_version}}
generate-release-changelog:
needs: create-release-branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: release-${{github.event.inputs.release_version}}
fetch-depth: 0
- name: install go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: install git-chglog
run: GOBIN=${GITHUB_WORKSPACE} go install github.com/git-chglog/git-chglog/cmd/git-chglog@v0.15.1
- name: generate release notes
run: |
git tag ${{github.event.inputs.release_version}}
${GITHUB_WORKSPACE}/git-chglog --tag-filter-pattern 'v\d+\.\d+\.\d+$' --output releases/CHANGELOG-${{github.event.inputs.release_version}}.md ${{github.event.inputs.release_version}}
git tag -d ${{github.event.inputs.release_version}}
git add releases/CHANGELOG-${{github.event.inputs.release_version}}.md
- name: remove git-chglog binary
run: rm -f ${GITHUB_WORKSPACE}/git-chglog
- name: create pull request
uses: peter-evans/create-pull-request@v3
with:
commit-message: 'release: ${{github.event.inputs.release_version}} CHANGELOG'
title: 'release: ${{github.event.inputs.release_version}} CHANGELOG'
body: Add CHANGELOG for upcoming ${{github.event.inputs.release_version}} release
branch: CHANGELOG-${{github.event.inputs.release_version}}