forked from cenote/jasperstarter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
100 lines (93 loc) · 2.99 KB
/
bitbucket-pipelines.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
image: cenote/jasperstarter-env
pipelines:
default:
- step:
name: Maven build
caches:
- maven
script:
- mvn clean package -P snapshot
artifacts:
- target/*.zip
- target/site/**
- step:
name: Upload artifact to sourceforge downloads
trigger: manual
script:
- ssh-keyscan -t rsa ${SF_HOST} >> ~/.ssh/known_hosts
- (umask 077; echo $SF_SSH_BASE64 | base64 --decode > ~/.ssh/id_rsa)
- scp target/*.zip ${SF_USER}@${SF_HOST}:${SF_FILEBASE}/snapshots/
- step:
name: Upload artifact to bitbucket downloads
trigger: manual
script:
- ARTIFACT=$(ls -1 target/*.zip|head -n1)
- ARTIFACT_BASENAME=$(basename $ARTIFACT)
- curl -X POST -v --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"${ARTIFACT}"
tags:
'*-*':
- step:
name: Maven release build and upload
caches:
- maven
script:
- mvn clean package -P release,windows-setup
- bash bitbucket-release-to-sourceforge.bash
branches:
java7*:
- step:
name: Java7 Maven build
image: maven:3.6-jdk-7
caches:
- maven
script:
- mvn -B clean package -P snapshot
artifacts:
- target/*.zip
- target/site/**
java9*:
- step:
image: cenote/xenial-java9
script:
- mvn -version
- mvn clean package -P snapshot,windows-setup -Dmaven.test.skip=true
- mvn test
# upload new artifact to sourceforge downloads
- ssh-keyscan -t rsa ${SF_HOST} >> ~/.ssh/known_hosts
- (umask 077; echo $SF_SSH_BASE64 | base64 --decode > ~/.ssh/id_rsa)
- scp target/*.zip ${SF_USER}@${SF_HOST}:${SF_FILEBASE}/snapshots/
# upload new artifact to bitbucket downloads
- ARTIFACT=$(ls -1 target/*.zip|head -n1)
- ARTIFACT_BASENAME=$(basename $ARTIFACT)
- curl -X POST -v --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"${ARTIFACT}"
custom:
java10-test:
- step:
name: Java10 Test
image: maven:3.6-jdk-10
caches:
- maven
script:
- mvn -B clean test
artifacts:
- target/**
java11-test:
- step:
name: Java11 Test
image: maven:3.6-jdk-11
caches:
- maven
script:
- mvn -B clean test
artifacts:
- target/**
java12-test:
- step:
name: Java12 Test
image: maven:3.6-jdk-12
caches:
- maven
script:
- mvn -B clean test
artifacts:
- target/**