-
Notifications
You must be signed in to change notification settings - Fork 9
65 lines (52 loc) · 2.08 KB
/
deploy.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
name: Deploy and Test
on:
workflow_dispatch:
jobs:
deploy_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Update Git Submodules
run: |
git submodule sync --recursive
git submodule update --recursive --init --force
git submodule update --remote --merge
- name: Export CLUSTER_PREFIX as GitHub Env Variable
run: echo "CLUSTER_PREFIX=${CLUSTER_PREFIX}-$(date +"%Y%m%d%H%M%S")" >> $GITHUB_ENV
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v0.2.0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Set up GKE Environment
run: |
bash setup-k8s.sh
- name: Set up Tooling
run: |
gcloud config set project neo4j-k8s-marketplace-public
docker pull gcr.io/cloud-marketplace-tools/k8s/dev
BIN_FILE="$HOME/bin/mpdev"
docker run \
gcr.io/cloud-marketplace-tools/k8s/dev \
cat /scripts/dev > "$BIN_FILE"
chmod +x "$BIN_FILE"
export REGISTRY=gcr.io/$(gcloud config get-value project | tr ':' '/')
- name: Build All Containers and Push to Staging Repo
run: make app/build
- name: Run Deployer Container to Test Deploy
run: |
mpdev install \
--deployer=gcr.io/neo4j-k8s-marketplace-public/causal-cluster/deployer:4.4 \
--parameters='{"name": "testdeploy", "namespace": "default", "image":"gcr.io/neo4j-k8s-marketplace-public/causal-cluster:4.4","coreServers":"3","readReplicaServers":"1"}'
- name: Run Tests
run: mpdev verify --deployer=gcr.io/neo4j-k8s-marketplace-public/causal-cluster/deployer:4.4 > VERIFY.log 2>&1
- name: Upload Verify Log
if: always()
uses: actions/upload-artifact@v2
with:
name: verify-log
path: VERIFY.log
- name: Run Cleanup
run: bash cleanup-k8s.sh