-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
110 lines (100 loc) · 2.86 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
98
99
100
101
102
103
104
105
106
107
108
109
110
before_script:
- export PATH=$PATH:$MAVEN_HOME/bin:$JAVA_HOME/bin
- java -version
- mvn -v
- pwd
- echo $HOME
- echo $MAVEN_CLI_OPTS
- echo $ORG_SLF4J_SIMPLELOGGER_DEFAULTLOGLEVEL
stages:
- build
- test
- deploy
- doc
- site
build:
stage: build
script:
- mvn $MAVEN_CLI_OPTS clean install -DskipTests
artifacts:
paths:
- target/*
- ./*/target/*
expire_in: 2 days
form-simpleunit:
stage: build
script:
- cd tex/
- xelatex -halt-on-error simpleUnit.tex
- xelatex -halt-on-error simpleUnit.tex
- htxelatex simpleUnit.tex xhtml
- zip simpleUnit.zip simpleUnit.pdf simpleUnit.html simpleUnit.css simpleUnit*x.svg
- scp simpleUnit.zip $PUBLIC_SITE_USER@$PUBLIC_SITE_SERVER:$PUBLIC_SITE_SERVER_PATH/su
- ssh $PUBLIC_SITE_USER@$PUBLIC_SITE_SERVER "cd $PUBLIC_SITE_SERVER_PATH/su ; unzip -o simpleUnit.zip ; mv simpleUnit.html index.html ; rm simpleUnit.zip"
artifacts:
paths:
- tex/simpleUnit.pdf
expire_in: 2 days
form-bibliograpi:
stage: build
script:
- cd tex/
- xelatex -halt-on-error bibliograpi.tex
- xelatex -halt-on-error bibliograpi.tex
- htxelatex bibliograpi.tex xhtml
- zip bibliograpi.zip bibliograpi.pdf bibliograpi.html bibliograpi.css bibliograpi*x.svg
- scp bibliograpi.zip $PUBLIC_SITE_USER@$PUBLIC_SITE_SERVER:$PUBLIC_SITE_SERVER_PATH/bibapi
- ssh $PUBLIC_SITE_USER@$PUBLIC_SITE_SERVER "cd $PUBLIC_SITE_SERVER_PATH/bibapi ; unzip -o bibliograpi.zip ; mv bibliograpi.html index.html ; rm bibliograpi.zip"
artifacts:
paths:
- tex/bibliograpi.pdf
expire_in: 2 days
test:
stage: test
script:
- mvn $MAVEN_CLI_OPTS jar:jar surefire:test
artifacts:
expire_in: 2 days
deploy:
stage: deploy
script:
- mvn $MAVEN_CLI_OPTS jar:jar deploy:deploy
environment:
name: maven
url: http://cosmoloj.com/maven/com/cosmoloj/cosmoloj/maven-metadata.xml
artifacts:
expire_in: 2 days
github:
stage: deploy
script:
- mvn $MAVEN_CLI_OPTS jar:jar deploy:deploy -Pgithub
artifacts:
expire_in: 2 days
javadoc:
stage: doc
script:
- mvn $MAVEN_CLI_OPTS jar:jar javadoc:aggregate-no-fork
artifacts:
expire_in: 2 days
site:
stage: site
script:
- mvn $MAVEN_CLI_OPTS clean install
- mvn $MAVEN_CLI_OPTS site-deploy
- curl --silent http://cosmoloj.com/cosmoloj/ | grep publishDate
- curl --silent http://cosmoloj.com/cosmoloj/apidocs/index.html | grep Generated
artifacts:
expire_in: 2 days
environment:
name: site
url: http://cosmoloj.com/cosmoloj/
sonar:
stage: site
script:
- mvn $MAVEN_CLI_OPTS clean install
- mvn $MAVEN_CLI_OPTS sonar:sonar -Dsonar.projectKey=$SONAR_PROJECT -Dsonar.host.url=http://$SONAR_SERVER:9000 -Dsonar.login=$SONAR_LOGIN
artifacts:
expire_in: 2 days
environment:
name: sonar
url: http://sonar.romiosyne.net/dashboard?id=cosmoloj