forked from usgs/winston
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
60 lines (52 loc) · 1.36 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
---
image: maven:3.3-jdk-8
variables:
MAVEN_OPTS: >-
-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
-Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true
MAVEN_CLI_OPTS: >-
--batch-mode --errors --fail-at-end --show-version
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .m2/repository
stages:
- test
- build
- docker
before_script:
- which ssh-agent || ( apt-get install -qq openssh-client )
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- echo -e "\tUser gitlab\n\n" >> ~/.ssh/config
test:verify:
stage: test
script:
- mvn $MAVEN_CLI_OPTS verify
build:vulcan4:
stage: build
only:
- tags
- master
script:
- mvn $MAVEN_CLI_OPTS -DinstallAtEnd=true -DdeployAtEnd=true deploy
docker:trigger_build:
image: curlimages/curl
stage: docker
only:
- tags
- master
before_script:
- echo skipping before script
script:
- >-
curl
-X POST
--form token=${TRIGGER_TOKEN}
--form ref=master
--form variables[WINSTON_VERSION]=$CI_COMMIT_TAG
https://code.chs.usgs.gov/api/v4/projects/4438/trigger/pipeline