-
Notifications
You must be signed in to change notification settings - Fork 13
70 lines (68 loc) · 2.28 KB
/
integration.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
name: Run Script on ARC Runners
on:
pull_request: # FIXME: Remove this before mergin
push:
branches:
- main
jobs:
integration:
strategy:
matrix:
runner: [box-3, devops-admin-gcp-dev-usce1]
runs-on: ${{ matrix.runner }}
name: Run on ${{ matrix.runner }}
steps:
# FIXME: add basic tools to the arc runner base image
# Missing: wget
- name: Install missing tools in arc runners
run: |
sudo apt-get update
sudo apt-get install -y wget
# Mutate the path since make installs tools to ./bin
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
- name: Set kubectl context to local
run: |
kubectl config set-cluster local-cluster --server=http://localhost:8080
kubectl config set-context local --cluster=local-cluster
kubectl config use-context local
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install dependencies
run: sudo apt-get install -y gnupg gnupg2 lsb-release
- name: Setup PostgreSQL
uses: tj-actions/install-postgresql@v3
with:
postgresql-version: 16
- run: |
# Some hacks to make github actions work
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
git tag 0.0.0
- name: Build and deploy
env:
REGISTRY: ghcr.io/${{ github.repository_owner }}
BUILDKIT_PROGRESS: plain
run: |
echo 'github' > .id
echo ${{ matrix.runner }} > .env
make build-images push-images deploy
- name: Run script on ${{ matrix.runner }}
env:
REGISTRY: ghcr.io/${{ github.repository_owner }}
BUILDKIT_PROGRESS: plain
run: |
NODEPLOY=1 make test-e2e