-
Notifications
You must be signed in to change notification settings - Fork 2
/
shippable.yml
55 lines (48 loc) · 2.22 KB
/
shippable.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
#
# Copyright © 2015 Thiago Moreira ([email protected])
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
language: java
jdk:
- oraclejdk8
env:
global:
- SEED_VERSION=3.0.0
- secure: DfPKfCWIlOqUUIMosOhbY0ciXtgDEIhIT8fAnWKe2U29/Ksvom7fi3JVGJ3s2zw6Oxyux7zK9EcWCT+161bDVQAxdoKRNSD30DqcNeEPBrUVNgK4hnpk9rZ1HFbiCYk+h6Fzbeo4bj366/soTZU1CHlkF8k1q1rhNlpMBRZHXrekU7wjUgP2M4RXjqSinf0IJIZoiq/Yj1NTGY83+zi/RWVm4UaxpuX8B9CXhQiFdQvxpDdizH05akTABsnPdnLmmbJP26/RdNzlS3B+mWW5yyBRPowh/JbgvYdfIRdbPUv0yMzKRlmRaV8AE5wKPQX5NcsHElNnagwwbYYOTKHcSw==
before_script:
- mkdir -p ~/.m2
- cp src/main/maven/settings.xml ~/.m2/settings.xml
- git remote set-url origin [email protected]:$REPO_FULL_NAME.git
build:
ci:
- mvn -B clean package
after_success:
- export CURRENT_VERSION=`mvn -B -q -N org.codehaus.mojo:exec-maven-plugin:1.6.0:exec -Dexec.executable='echo' -Dexec.args='${project.version}'`
- >
if [ "$BRANCH" == "master" ] && [ "$SEED_VERSION" != "$CURRENT_VERSION" ]; then
mvn -B versions:set "-DnewVersion=${SEED_VERSION}" &&
git commit -am "Releasing version ${SEED_VERSION}" &&
git tag -a "${SEED_VERSION}" -m "Releasing version ${SEED_VERSION}" &&
mvn -B clean deploy &&
git checkout -B develop origin/develop &&
git merge --no-edit master &&
mvn -B build-helper:parse-version versions:set -DnewVersion=$\{parsedVersion.majorVersion\}.$\{parsedVersion.minorVersion\}.$\{parsedVersion.nextIncrementalVersion\}-SNAPSHOT &&
git commit -am "Prepare for next development iteration" &&
ssh-agent bash -c "ssh-add /tmp/ssh/ShippableSSHKey; git push --atomic origin master develop --tags"
fi
- mvn -B deploy
integrations:
key:
- integrationName: "Shippable SSH Key"
type: sshKey