-
Notifications
You must be signed in to change notification settings - Fork 14
/
.gitlab-ci.yml
49 lines (47 loc) · 1.68 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
build:
stage: build
image: maven:3-eclipse-temurin-17
variables:
GRADLE_USER_HOME: "$CI_PROJECT_DIR/.gradle"
before_script:
- mvn --version
script:
- ./gradlew --no-daemon --warning-mode=all prepareMaven
- mvn -Dmaven.repo.local="$CI_PROJECT_DIR/maven_repo_local" -f de.prob.parent/pom.xml install
- cp footer.html de.prob.repository/target/repository/
cache:
paths:
- .gradle/caches
- .gradle/native
- .gradle/notifications
- .gradle/wrapper
- maven_repo_local
artifacts:
paths:
- de.prob.repository/target/repository
- "*/target/work/configuration/*.log"
when: always
deploy:nightly:
stage: deploy
only:
- develop@general/stups/prob_rodin_plugin
image: alpine:3
variables:
GIT_STRATEGY: none
before_script:
- apk update
- apk add lftp openssh-client
script:
- LFTP_PASSWORD="${DEPLOY_PASSWORD}" lftp -c "set cmd:fail-exit true; set sftp:auto-confirm true; open --user ${DEPLOY_USERNAME} --env-password sftp://${DEPLOY_HOST}/${DEPLOY_REMOTE_BASEDIR}/rodin/prob1/nightly/; mirror -vvv -R --delete de.prob.repository/target/repository ."
deploy:release:
stage: deploy
only:
- master@general/stups/prob_rodin_plugin
image: alpine:3
variables:
GIT_STRATEGY: none
before_script:
- apk update
- apk add lftp openssh-client
script:
- LFTP_PASSWORD="${DEPLOY_PASSWORD}" lftp -c "set cmd:fail-exit true; set sftp:auto-confirm true; open --user ${DEPLOY_USERNAME} --env-password sftp://${DEPLOY_HOST}/${DEPLOY_REMOTE_BASEDIR}/rodin/prob1/; mkdir release-next; mirror -vvv -R de.prob.repository/target/repository release-next; mv release release-prev; mv release-next release"