-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (46 loc) · 1.72 KB
/
azure-pipelines-emerynet.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
name: CI CD Emerynet
on:
push
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
sudo install skaffold /usr/local/bin/
shell: bash
- name: Download Service Account Key
run: |
mkdir -p $GITHUB_WORKSPACE/authkey
echo "${{ secrets.GCP_AUTH_KEY }}" > $GITHUB_WORKSPACE/authkey/google-credentials.json
shell: bash
- name: Set Google Cloud Credentials
run: |
export GOOGLE_APPLICATION_CREDENTIALS="$GITHUB_WORKSPACE/authkey/google-credentials.json"
shell: bash
- name: Configure Docker to Authenticate with Google Cloud
run: |
gcloud auth configure-docker
shell: bash
- name: Login to Container Registry
run: echo "$GCP_AUTH_KEY" | docker login -u _json_key --password-stdin https://gcr.io
env:
DOCKER_CLI_ACI_SERVER: ${{ secrets.CONTAINER_REGISTRY_SERVER }}
shell: bash
- name: Login to Kubernetes
uses: azure/k8s-set-context@v1
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
cluster-context: "gke-service-connection"
namespace: "agoric-makefile-automation"
- name: Build and push Docker images
run: |
cd frontend
export $(grep -v '^#' .env.emerynet | xargs)
envsubst < ../deployment/emerynet/workloads/config/ui-config.template.yaml > ../deployment/emerynet/workloads/config/ui-config.yaml
envsubst < skaffold.emerynet.template.yaml > skaffold.emerynet.yaml
skaffold run --filename skaffold.emerynet.yaml
shell: bash