-
Notifications
You must be signed in to change notification settings - Fork 13
72 lines (62 loc) · 2.19 KB
/
deploy.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# name: Deploy
# on:
# push:
# branches:
# - main
# release:
# types:
# - created
# jobs:
# deploy:
# runs-on: ubuntu-latest
# timeout-minutes: 60
# steps:
# - name: Set environment
# id: environment
# run: |
# echo ${{ github.event_name }}
# if [[ ${{ github.event_name == 'release' }} == true ]]; then
# environment=prod
# else
# environment=staging
# fi
# echo "environment: ${environment}"
# echo "::set-output name=environment::${environment}"
# - uses: azure/login@v1
# with:
# creds: ${{ secrets.AZURE_CREDENTIALS }}
# - uses: actions/checkout@v2
# with:
# fetch-depth: 2
# - uses: hashicorp/setup-terraform@v1
# with:
# # We parse the output so set this flag
# terraform_wrapper: false
# - uses: azure/setup-helm@v1
# - name: Azure CLI script
# env:
# ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
# ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
# ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
# ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
# PROD_TEST_BOT_TOKEN: ${{ secrets.PROD_TEST_BOT_TOKEN }}
# STAGING_TEST_BOT_TOKEN: ${{ secrets.STAGING_TEST_BOT_TOKEN }}
# run: |
# export ENVIRONMENT=${{ steps.environment.outputs.environment }}
# echo "[Deploying ${ENVIRONMENT}]"
# # # export subscriptionId=$(subscriptionId)
# # # # For Terraform
# # # For Azure CLI
# # export AZURE_TENANT_ID=${tenantId}
# # export AZURE_CLIENT_ID=${servicePrincipalId}
# # export AZURE_CLIENT_SECRET=${servicePrincipalKey}
# if [[ ${ENVIRONMENT} == "prod" ]]; then
# export TEST_BOT_TOKEN=${PROD_TEST_BOT_TOKEN}
# export JUPYTERHUB_URL="https://pccompute.westeurope.cloudapp.azure.com/compute"
# else
# export TEST_BOT_TOKEN=${STAGING_TEST_BOT_TOKEN}
# export JUPYTERHUB_URL="https://pcc-staging.westeurope.cloudapp.azure.com/compute"
# fi
# echo [JUPYTERHUB_URL $JUPYTERHUB_URL]
# sh ./scripts/setup
# sh ./scripts/deploy