-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
executable file
·97 lines (90 loc) · 2.57 KB
/
.gitlab-ci.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
image: maven:3.8.1-jdk-17-slim
variables:
MAVEN_CLI_OPTS: "--batch-mode"
MAVEN_OPTS: "-Ddoclint=none"
CHANGELOG_FILE: "changelog_v0.9.5.md"
STAGING_JOBS_ENABLED: "false"
REMOTE_ST_GITHUB: "git@github.com:st-tu-dresden/bigraph-framework.git"
stages:
- build
- test
- deploy
build:
stage: build
only:
- branches
except:
- /^feature.*$/
script:
# - mvn validate -f ./etc/aggregator/pom.xml
- mvn $MAVEN_CLI_OPTS clean install -U -DskipTests
# - mvn $MAVEN_CLI_OPTS clean compile
"Running tests":
stage: test
only:
refs:
- master
- release
variables:
- $STAGING_JOBS_ENABLED == "true"
script:
- mvn dependency-check:check
- mvn $MAVEN_OPTS $MAVEN_CLI_OPTS test
"Generate Changelog":
stage: deploy
only:
- master
- release
- ^v[0-9]+(?:.[0-9]+)+$
image: docker:19.03.0-git
artifacts:
name: "bigarts"
paths:
- ${CHANGELOG_FILE}
script:
- apk update
- apk add bash
# - ./etc/ci/changelog.sh .mvn/maven.config
# - cp ${CHANGELOG_FILE} etc/doc/docs/changelogs/
#"Generate Documentation":
# stage: deploy
# only:
# variables:
# - $STAGING_JOBS_ENABLED == "true"
# refs:
# - master
# - develop
# - ^v[0-9]+(?:.[0-9]+)+$
# before_script:
# - apt-get update && apt-get install -y git
# - git config --global user.email "dominik.grzelak@tu-dresden.de"
# - git config --global user.name "Dominik Grzelak"
# - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
# - eval $(ssh-agent -s)
# - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
# - mkdir -p ~/.ssh
# - chmod 700 ~/.ssh
# # - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
# - chmod 644 ~/.ssh/known_hosts
# script:
# - rm -rf ./documentation/docusaurus/website/build
# - mvn $MAVEN_CLI_OPTS install exec:java -f documentation/pom.xml
# - mvn $MAVEN_CLI_OPTS install -Pdistribute
# - mvn install -f documentation/pom.xml -Pdistribute
# - cd ./documentation/docusaurus/website/build/bigraph-framework && git init
# - touch CNAME && echo "www.bigraphs.org" > CNAME
# - git add . && git commit -m "updated documentation"
# - git remote add stgithub $REMOTE_ST_GITHUB
# - git remote -v
# - git push --force stgithub master:gh-pages
#"Deploy Artifacts":
# stage: deploy
# only:
# variables:
# - $STAGING_JOBS_ENABLED == "true"
# refs:
# - master
# - ^v[0-9]+(?:.[0-9]+)+$
# script:
# - mvn $MAVEN_CLI_OPTS deploy