Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoBackendAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Dojo Project (HES-SO)
Projects
Backend
DojoBackendAPI
Commits
d1bdb1a0
Commit
d1bdb1a0
authored
1 year ago
by
michael.minelli
Browse files
Options
Downloads
Plain Diff
Merge branch 'doc-auto-push-changelog' into v3.6.0
parents
37189278
436fe29d
No related branches found
No related tags found
1 merge request
!3
Return error when client headers are missing (issue #19)
Pipeline
#29858
passed
1 year ago
Stage: code_quality
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+60
-4
60 additions, 4 deletions
.gitlab-ci.yml
with
60 additions
and
4 deletions
.gitlab-ci.yml
+
60
−
4
View file @
d1bdb1a0
...
...
@@ -15,6 +15,21 @@ variables:
WIKI_FOLDER
:
Wiki
DOC_CHANGELOG_FILE
:
ZolaApp/content/changelog/projects/103_api.md
DOC_FILE_BEGIN
:
|
+++
title = "Dojo Backend API"
slug = "dojo-backend-api"
weight = 103
template = "docs/page.html"
[extra]
lead = "Changelog of The Dojo Backend API."
toc = true
top = false
+++
.get_version
:
script
:
...
...
@@ -111,7 +126,7 @@ clean:packages:
-
if
:
'
$CI_COMMIT_REF_PROTECTED
==
"true"'
clean:
dev:
release
:
clean:release:
dev
:
stage
:
clean
tags
:
-
gitlab_clean
...
...
@@ -124,7 +139,7 @@ clean:dev:release:
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
clean:
dev:
packages
:
clean:packages:
dev
:
stage
:
clean
tags
:
-
gitlab_clean
...
...
@@ -137,7 +152,7 @@ clean:dev:packages:
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
upload:packages:wiki
:
upload:packages:
doc:
wiki
:
stage
:
upload
tags
:
-
gitlab_package
...
...
@@ -160,7 +175,7 @@ upload:packages:wiki:
-
if
:
'
$CI_COMMIT_REF_PROTECTED
==
"true"'
release:wiki
:
release:
doc:
wiki
:
stage
:
release
tags
:
-
release
...
...
@@ -208,6 +223,47 @@ release:wiki:
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
release:doc:changelog
:
stage
:
release
tags
:
-
release
image
:
ubuntu:latest
script
:
# Install dependencies
-
apt-get update -y
-
apt-get install -y openssh-client git unzip sshpass --fix-missing
# Add SSH key
-
eval `ssh-agent -s`
-
echo "$DOC_GIT_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
echo "$DOC_GIT_SSH_PUBLIC_KEY" >> ~/.ssh/id_rsa.pub
-
echo "$DOC_GIT_SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa
-
'
[[
-f
/.dockerenv
]]
&&
echo
-e
"Host
*\n\tStrictHostKeyChecking
no\n\n"
>
~/.ssh/config'
# Set git config
-
git config --global user.email "dojo@minelli.me"
-
git config --global user.name "[Gitlab CI/CD] ${PROJECT_NAME}"
# Pull repo
-
git clone ssh://git@ssh.hesge.ch:10572/dojo_project/projects/ui/dojodoc.git
# Do something after pulling your repo
-
echo "${DOC_FILE_BEGIN}$(cat CHANGELOG.md)" > dojodoc/${DOC_CHANGELOG_FILE}
# Push repo changes into current repo
-
cd dojodoc
-
git add ${DOC_CHANGELOG_FILE}
-
git commit -m "[Gitlab CI/CD] ${PROJECT_NAME} => Automatic update of changelog" || echo "No changes, nothing to commit!"
-
git push
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
release:gitlab
:
stage
:
release
tags
:
...
...
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