Commit 9c5ea361 authored by Stefan Funk's avatar Stefan Funk
Browse files

Merge branch 'release/2021-11-26'

parents d5867cb4 ac27a54d
Pipeline #253321 failed with stages
in 1 minute and 59 seconds
variables:
BRANCH_NAME: $CI_COMMIT_REF_NAME
PIPELINE_ID: $CI_PIPELINE_IID
VARIABLES_FILE: ./variables.txt
ADD_TO_DEB_FILE_PACKAGE_COUNT: 1027
###################
### TEMPLATES ###
###################
.webapp: &webapp
image: alpine:3.14
stage: deploy_deb
script:
- DEPLOY_DEB_COMMAND='curl -u ci:${APTLY_PASSWORD} -X PUT -H "Content-Type:application/json" --data "{}" ${APTLY_URL}/publish/:./indy'
# Get iteration here and get the new DEB filename! ONLY needed because of the versioning here: Every version “2021-11-XX-SNAPSHOT“ comes AFTER “2021-SNAPSHOT“ alphabetically! Do not use DEB packages here or change package name eventually for future versions!
- ITERATION=$(expr ${build_number} + $ADD_TO_DEB_FILE_PACKAGE_COUNT)
- NEW_DEB_FILE_NAME=${PNAME}'_'${PVERSION}'-'$ITERATION'.deb'
# Rename the file and add the iteration!
- mv $deb_file_name $NEW_DEB_FILE_NAME
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
# Use the new deb file name here for uploading to aptly!
- DEB_NAME=$NEW_DEB_FILE_NAME
- 'if [[ $PVERSION =~ .*${PKEY}$ ]]; then'
- echo "---A ${PKEY} BUILD IS BEING PERFORMED---"
- 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}'
- 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/${APTLY_TARGET}/file/${DEB_NAME}'
- echo $DEPLOY_DEB_COMMAND
- response=$(eval "$DEPLOY_DEB_COMMAND")
- echo $response
- if test "${response#*"error"}" != "$response"; then exit 1; else echo "Job completed.";fi
- fi
stages:
- build
- packaging
- deploy_deb
build:
only:
- develop
- main
image: python:3
stage: build
script:
- git submodule init
- git submodule update --remote --force
- if test "$BRANCH_NAME" = 'develop'; then
- git submodule foreach git checkout ${BRANCH_NAME}
- git submodule foreach git pull
- fi
- cd docs
- apt-get update && apt-get -y install python3-virtualenv
- virtualenv venv
- pwd . venv/bin/activate
- pip install -r requirements.txt
- snapshot="-SNAPSHOT"
- if test "$BRANCH_NAME" = 'main'; then snapshot=""; fi
- RELEASE_DATE="$(date +'%Y-%m-%d')${snapshot}"
- RELEASE_VERSION="$(date +'%Y-%m')${snapshot}"
- make clean html SPHINXOPTS="-D version=${RELEASE_VERSION} -D release=${RELEASE_DATE}"
artifacts:
paths:
- docs/_build/html
package_dev:
only:
- develop
image: ruby:3.0
stage: packaging
variables:
name: 'dariah-de-doc'
description: 'DARIAH-DE Repository Documentation'
url: 'https://de.dariah.de'
build_number: $PIPELINE_ID
version: '2021-SNAPSHOT'
deb_file_name: '${name}_${version}.deb'
script:
- gem install fpm
# Iteration for DEB file iteration param only! Can not get this iteration to $deb_file_name var from bash scripting! Care about that in webapp template by renaming the deb file!
- ITERATION=$(expr ${build_number} + $ADD_TO_DEB_FILE_PACKAGE_COUNT)
- 'fpm -p $deb_file_name
-t deb -a noarch -s dir
--name ${name}
--description "${description}"
--maintainer "DARIAH-DE <info@de.dariah.eu>"
--vendor "DARIAH-DE"
--url ${url}
--iteration $ITERATION
--version ${version}
-x ".git**"
-x "**/.git**"
-x "**/.hg**"
-x "**/.svn**"
-x ".buildinfo"
-x "**/*.deb"
--prefix /var/www/doc/services
-C docs/_build/html .'
artifacts:
paths:
- $deb_file_name
package_prod:
only:
- main
image: ruby:3.0
stage: packaging
variables:
name: 'dariah-de-doc'
description: 'DARIAH-DE Repository API Documentation'
url: 'https://de.dariah.eu'
build_number: $PIPELINE_ID
version: '2021-11-22'
deb_file_name: '${name}_${version}.deb'
script:
- gem install fpm
# Iteration for DEB file iteration param only! Can not get this iteration to $deb_file_name var from bash scripting! Care about that in webapp template by renaming the deb file!
- ITERATION=$(expr ${build_number} + $ADD_TO_DEB_FILE_PACKAGE_COUNT)
- 'fpm -p $deb_file_name
-t deb -a noarch -s dir
--name ${name}
--description "${description}"
--maintainer "DARIAH-DE <info@de.dariah.eu>"
--vendor "DARIAH-DE"
--url ${url}
--iteration $ITERATION
--version ${version}
-x ".git**"
-x "**/.git**"
-x "**/.hg**"
-x "**/.svn**"
-x ".buildinfo"
-x "**/*.deb"
--prefix /var/www/doc/services
-C docs/_build/html .'
artifacts:
paths:
- $deb_file_name
deploy_dev:
only:
- develop
variables:
PNAME: 'dariah-de-doc'
PPATH: '.'
PVERSION: '2021-SNAPSHOT'
PKEY: 'SNAPSHOT'
APTLY_TARGET: 'indy-snapshots'
build_number: $PIPELINE_ID
deb_file_name: '${PNAME}_${PVERSION}.deb'
<<: *webapp
deploy_prod:
only:
- main
variables:
PNAME: 'dariah-de-doc'
PPATH: '.'
PVERSION: '2021-11-26'
PKEY: ''
APTLY_TARGET: 'indy-releases'
build_number: $PIPELINE_ID
deb_file_name: '${PNAME}_${PVERSION}.deb'
<<: *webapp
[submodule "docs/submodules/oai-pmh"]
path = docs/submodules/oai-pmh
url = git://projects.gwdg.de/dariah-de/tg/textgrid-repository/oai-pmh.git
branch = develop
[submodule "docs/submodules/kolibri"]
path = docs/submodules/kolibri
url = git://projects.gwdg.de/dariah-de/kolibri.git
branch = develop
[submodule "docs/submodules/tg-crud"]
path = docs/submodules/tg-crud
url = git://projects.gwdg.de/dariah-de/tg/textgrid-repository/tg-crud.git
branch = develop
path = docs/submodules/tg-crud
url = https://gitlab.gwdg.de/dariah-de/dariah-de-crud-services.git
[submodule "docs/submodules/publikator"]
path = docs/submodules/publikator
url = git://projects.gwdg.de/dariah-de/dariah-de-repository/publikator.git
......
......@@ -11,8 +11,8 @@ node {
stage('Build') {
sh '''
# Please set BRANCH to develop or master!
BRANCH=master
#BRANCH=develop
#BRANCH=master
BRANCH=develop
echo "===> initialising submodules"
git submodule init
......
DARIAH-DE Repository Documentation
==================================
# DARIAH-DE Repository and API Documentation
Documentation for dhrep is included in /docs:
This repository gathers all documentation of DH-rep services and deploys them as the DARIAH-DE Repository Documentation to https://repository.de.dariah.eu, https://dhrepworkshop.de.dariah.eu/doc, and https://trep.de.dariah.eu/doc.
Please do initially a:
Please initially do a:
$git submodule init
$ git submodule init
and then each time to update modules:
$git submodule update --force --remote
$ git submodule update --force --remote
For every push into the develop branch a SNAPSHOT build is being performed (and deployed to trep.de.dariah.eu), the main branch is build as a RELEASE build (and deployed to repository.de.dariah.eu and dhrepworkshop.de.dariah.eu). For more information please see RELEASE.md.
All submodules have got an documentation folder, mostly the docs/ folder, or dhrep_docs/, or tgrep_docs/, from time to time they are contained in subfolders (please see Jenkinsfile).
If you want to add a new submodule, please use:
We are using gitflow for developing and releasing, please see <https://wiki.de.dariah.eu/display/DARIAH3/DARIAH-DE+Release+Management>
SNAPSHOT versions are set in conf.py to '2019-SNAPSHOT' and '2019-01-25-SNAPSHOT', release versions are set to '2019' and '2019-01-25' (see documentation in conf.py).
At the moment submodules are used from branch develop! So we have not to release all services (and documentation) before releasing the documentation!
$ git submodule add [git repo of module] [folder of submodule]
# Release of DARIAH-DE Repository Documentation
Please just commit and push to develop and then use (still) the [DARIAH-DE Release Workflow](https://wiki.de.dariah.eu/display/DARIAH3/DARIAH-DE+Release+Management).
No versions have to be changed, all versioning is done in gitlab CI/CD.
## Fast Release
1. Commit and push to develop
2. Wait for deployment
3. Do test!
4. Use the (here without version changes) DARIAH-DE Release Workflow
git flow release start 2021-11-22
git flow release finish 2021-11-22
git push origin main develop --tag
......@@ -56,15 +56,17 @@ copyright = u'2021, DARIAH-DE'
# built documents.
#
# The short X.Y version.
# NOTE: Please use "2019-SNAPSHOT" for snapshot deployment, and
# "2019" (without suffix) for release deployment!
#version = '2021-SNAPSHOT'
version = '2021-10-18'
# NOTE: Please use "2021-SNAPSHOT" for snapshot deployment, and
# "2021" (without suffix) for release deployment!
# ANOTHER NOTE: version is set in .gitlab-ci.yml now! Please look there and in RELEASE.md doc!
version = '2021-SNAPSHOT'
#version = '2021-10-18'
# The full version, including alpha/beta/rc tags.
# Please put here the release date as release version!
#release = '2021-SNAPSHOT'
release = '2021-10-18'
# ANOTHER NOTE: release version also is set in .gitlab-ci.yml now! Please look there and in RELEASE.md doc!
release = '2021-SNAPSHOT'
#release = '2021-10-18'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
# Main dependencies for compilation
sphinx==1.3.1
pygments==1.6
pygments>=2.0
docutils <0.13.1
# additional sphinx plugins
#sphinxcontrib-phpdomain==0.1.4
sphinxcontrib-httpdomain==1.3.0
#tk.phpautodoc==1.2.1
#javasphinx==0.9.13
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment