-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (53 loc) · 1.89 KB
/
theGarrison.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
name: Github Workflow
on:
push:
branches:
- master
workflows:
build-and-deploy:
jobs:
- job: Building & Deploying
runs-on: ubuntu-latest
steps:
# Checkout code from GitLab
- name: Checkout code
uses: actions/checkout@v2
# Configure Kubernetes cluster
- name: Configure Kubernetes cluster
id: setup-kubeconfig
uses: google/kubernetes-e2e-utils@master
env:
GOOGLE_API_USE_EXECUTION_TIMEOUT: '1m'
GOOGLE_API_KEY_FILE_LOCATION: ${{ secrets.KUBECONFIG }}
with:
api_url: $(google-api-urls keytool)
if: always()
# Build Docker image
- name: Build Docker Image
id: build-image
run: docker-compose run --rm builder bash -c "$(docker-compose -f scripts/docker-compose.dev.yml build -q)"
env:
NODE_TOKEN: ${{ secrets.NODE_TOKEN }}
# Deploy to Kubernetes cluster
- name: Deploy to Kubernetes Cluster
env:
ARGOCD_URL: ${{ secrets.ARGOCD_URL }}
CLIENT_ID: ${{ secrets.CLIENT_SECRET }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REDIRECT_URI: http://localhost:8050
run: argocd deploy --non-interactive --loglevel info --force-regenerate ${{ env.REPO_DIR }}/src/main/argo && curl ${ARGOCD_URL}/argodashboard/login/ --data '{"username": "${env.USERNAME}", "password":"${env.PASSWORD}"}'
if: always()
on:
schedule:
cron: 0 0 * * *
jobs:
Test:
runs-on: ubuntu-latest
services:
- source: { url: secretServiceAccount }
connectionKey: secret-source-service-connection-key
steps:
# Run integration tests against public DNS IP
- name: Start Test Servers
id: test-start
run: ./terraform destroy --allow-destroy-without-state && ./terraform apply --input='path=${REPO_DIR}' && $(curl http://publicDNSIP?mode=integTest) > $JOB_STEPS_LOG