-
Notifications
You must be signed in to change notification settings - Fork 12
128 lines (119 loc) · 3.85 KB
/
nightly.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
126
127
128
name: Nightly Build
on:
workflow_dispatch:
schedule:
- cron: '0 20 * * *'
jobs:
pd-images:
name: Build and Push Placement Driver Images
strategy:
matrix:
go-version: [ "1.21" ]
platform: [ "ubuntu-latest" ]
runs-on: ${{ matrix.platform }}
defaults:
run:
working-directory: ./pd
timeout-minutes: 30
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Go Cache
uses: actions/cache@v3
with:
path: ./pd/.go/cache
key: ${{matrix.platform}}-${{matrix.go-version}}-pd-nightly-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{matrix.platform}}-${{matrix.go-version}}-pd-nightly-
${{matrix.platform}}-${{matrix.go-version}}-pd-
- name: Install flatc
run: |
sudo ../scripts/try_install_flatc.sh
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: elasticstream
password: ${{ secrets.DOCKERHUB_READ_WRITE_TOKEN }}
- name: Build and Push Nightly Images
run: make manifest-list GO_VERSION=${{ matrix.go-version }} VERSION=nightly ALL_PLATFORMS=linux/amd64
elastic-stream-and-long-running-images:
name: Build and Push Elastic Stream and Long Running Images
strategy:
matrix:
go-version: ["1.21"]
platform: ["ubuntu-22.04"]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all history so that git describe works
- name: Go Cache
uses: actions/cache@v3
with:
path: ./pd/.go/cache
key: ${{matrix.platform}}-${{matrix.go-version}}-pd-release-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{matrix.platform}}-${{matrix.go-version}}-pd-release-
${{matrix.platform}}-${{matrix.go-version}}-pd-
- name: Install flatc
run: |
sudo ./scripts/try_install_flatc.sh
- name: Build Placement Driver Debian Packages
working-directory: ./pd
run: make all-deb GO_VERSION=${{ matrix.go-version }} ALL_PLATFORMS=linux/amd64
- name: Rust Cache
uses: Swatinem/rust-cache@v2.4.0
with:
prefix-key: ""
env-vars: ""
- name: Install Deps
run: |
sudo ./scripts/install_deps.sh
cargo install cross --git https://github.com/cross-rs/cross
- name: Build Range Server Debian Packages
run: |
make all-deb PROFILE=release ALL_PLATFORMS=linux/amd64
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build SDK
working-directory: ./sdks
run: |
./build.sh
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: elasticstream
password: ${{ secrets.DOCKERHUB_READ_WRITE_TOKEN }}
- name: Build Docker Image
working-directory: ./dist/docker
run: |
./build-nightly.sh
upgrade-helm-chart:
name: Upgrade helm chart on private k3s
runs-on: private-k3s
needs: [elastic-stream-and-long-running-images]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Update Helm Chart
working-directory: ./dist/helm-chart
env:
KUBE_CONFIG_DATA: ${{ secrets.DEV_KUBE_CONFIG_DATA }}
run: |
./upgrade.sh
upgrade-chaos-mesh:
name: Upgrade chaos mesh on private k3s
runs-on: private-k3s
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Upgrade chaos-mesh
working-directory: ./dist/chaos-mesh
env:
KUBE_CONFIG_DATA: ${{ secrets.DEV_KUBE_CONFIG_DATA }}
run: |
./upgrade.sh