Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
frozen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CSE6
frozen
Commits
a5abddf5
Commit
a5abddf5
authored
2 years ago
by
Arno Wunderlich
Browse files
Options
Downloads
Patches
Plain Diff
changed intendation
parent
8fd2f105
No related branches found
Branches containing commit
No related tags found
1 merge request
!30
Add staging stage
Pipeline
#14920
failed
2 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+5
-5
5 additions, 5 deletions
.gitlab-ci.yml
with
5 additions
and
5 deletions
.gitlab-ci.yml
+
5
−
5
View file @
a5abddf5
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment