Skip to content
Snippets Groups Projects
Commit a5abddf5 authored by Arno Wunderlich's avatar Arno Wunderlich
Browse files

changed intendation

parent 8fd2f105
No related branches found
No related tags found
1 merge request!30Add staging stage
Pipeline #14920 failed
......@@ -70,7 +70,7 @@ test:
deploy to staging:
stage: staging
## Only run this stage when main branch receives changes.
only:
only:
- main
## Use microsoft provided azure cli image, that contains az cli.
......@@ -78,11 +78,11 @@ deploy to staging:
## Setup the environment variables. The can be accessed through the gitlab
## Deployments -> Environments. Generates url based on the app and branch name.
environment:
environment:
name: $CI_JOB_STAGE
url: https://${AZURE_APP_NAME}-${CI_ENVIRONMENT_SLUG}.azurewebsites.net
before_script:
before_script:
## Make sanity check that gitlab variables stage is done.
- test -z "${AZURE_SP_NAME}" && (echo "Missing required variable AZURE_SP_NAME. See 'Staging.md'"; exit 1)
- test -f "${AZURE_SP_CERT}" || ( echo "AZURE_SP_CERT (${AZURE_SP_CERT}) file is missing!"; exit 1)
......@@ -93,7 +93,7 @@ deploy to staging:
## Login into azure
- az login --service-principal -u "${AZURE_SP_NAME}" -p "${AZURE_SP_CERT}" --tenant "jyu.onmicrosoft.com"
script:
script:
## Create staging slot and copy settings from production
- |
az webapp deployment slot create -n "$AZURE_APP_NAME" -g "$AZURE_RESOURCE_GROUP" \
......@@ -117,7 +117,7 @@ deploy to staging:
## Store server info as artifact for prosperity
- curl "$CI_ENVIRONMENT_URL/server-info" -o server-info.json
artifacts:
artifacts:
paths:
- server-info.json
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment