forked from OpenIdentityPlatform/OpenAM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (84 loc) · 4.04 KB
/
.travis.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
language: java
git:
depth: 9999
cache:
directories:
- $HOME/.m2
matrix:
include:
- os: linux
jdk: openjdk8
sudo: required
services:
- docker
before_deploy:
- git config --local user.name "Open Identity Platform Community" && git config --local user.email "[email protected]"
- git checkout -f $TRAVIS_BRANCH
- git tag -f $git_version && git tag -d $git_version
- mvn -q -B -DreleaseVersion="$git_version" -DtagNameFormat="@{project.version}" -DignoreSnapshots=true -DpushChanges=false -DscmCommentPrefix="[ci skip] $TRAVIS_REPO_SLUG " -DskipTests -Darguments=-DskipTests -Dresume=false clean release:prepare
- git push --quiet --force https://[email protected]/$TRAVIS_REPO_SLUG.git >/dev/null 2>&1
- git push --quiet --force https://[email protected]/$TRAVIS_REPO_SLUG.git $git_version >/dev/null 2>&1
deploy:
provider: releases
draft: false
prerelease: false
target_commitish: $(git rev-list -n 1 $git_version)
tag_name: $git_version
name: $git_version
body: "compare: $(git rev-list -n 1 $git_version_last)...$(git rev-list -n 1 $git_version)"
api_key:
secure: SjVM74aEOKoFNVcs1EifBIz6VoABrUWB358VRX3hc7Fakvq1p7Ze3lQ99PTXIwoaf4K3d4kwxe/KJjhKq/imDgcjyeRoqEsIPj3ijPnjM6ew5Ic2v+lV+vxjgdgFUOFNUZ/TXn+KepPtsFEOeZbJ2O5CHm2dBXFUztlT+GN2UfY2Xarr3ek2rs7l95+YLoCgN4GhkXvQDKSEtpWxxSG/C3WH3kS6KqAMu+sAQy6FBqGNbEz7fMvoVhqeq5F0pvczJKaKuxAmk0OJFaydQH8rpC1s19JVmu5SN9sVRjkj8gj2Q1cAxIn1v96DDNgSmGmD3KptucWzP06AxsZs2lajjSJc72Lf75hZ8/u/W0e9Kc4sMj5lo4NWdGS0o5J5JEmP62ds1k9f6OIr5EEsRKz7I5W9pufcECLCKDPc/wCOoLxj+X4xuTzoXLmTqpo7LlLbHtmboHcLHrZPpbtLneqhWOHzUq55uC+tHAa+IDDpYAO+SbKbeMgtLModwaP0m8FFmM2MZhfjXzxlDnPpxLPIAtu8dsdW9Y3thXBLQEXBg50B2Bsadh2TDowGFq+ZMadRTx85+WyI6fETxlMayb1wpozYixFOzqokRsqX+dGgLe9H7zMm5u5+SyMMlWR76iW4KtZWuuqwg86lBHh5MVd8vNmv4yRu4cY3YvrFguHixhA=
skip_cleanup: true
overwrite: true
file_glob: true
file:
- "openam-distribution/openam-distribution-kit/target/*.zip"
- "openam-distribution/openam-distribution-ssoconfiguratortools/target/*.zip"
- "openam-distribution/openam-distribution-fedlet-unconfigured/target/*.zip"
- "openam-distribution/openam-distribution-ssoadmintools/target/*.zip"
- "openam-console/target/*.war"
- "openam-server/target/*.war"
- "openam-server-only/target/*.war"
- "openam-distribution/openam-distribution-fedlet-unconfigured/target/*.war"
- "openam-distribution/openam-distribution-docker/target/Dockerfile"
on:
repo: OpenIdentityPlatform/OpenAM
tags: false
branch:
- master
- travis
after_deploy:
- echo 'after_deploy'
- echo 'build and push Docker'
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- docker build ./openam-distribution/openam-distribution-docker/target -t $DOCKER_USERNAME/openam -t $DOCKER_USERNAME/openam:$git_version
- docker push $DOCKER_USERNAME/openam:$git_version
- docker push $DOCKER_USERNAME/openam
- os: osx
osx_image: xcode9.1
allow_failures:
- os: osx
branches:
except:
- /[0-9]+\.[0-9]+\.[0-9]+$/
notifications:
email:
before_install:
- date -u
- uname -a
- # if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then brew install rpm wine; else sudo apt-get install -y rpm wine; fi
- git fetch -t
- export git_version_last="$(git describe --abbrev=0 --tags --always)"
- export git_version="$(echo $git_version_last | awk -F . '{ printf "%d.%d.%d", $1,$2,$3 + 1}')"
- env | sort
- git log `git describe --tags --abbrev=0 HEAD^ --always`..HEAD --oneline
install:
- mvn -q -B -DskipTests -Dmaven.javadoc.skip=true install -f OpenDJ/forgerock-parent
- mvn -q -B -DskipTests -Dmaven.javadoc.skip=true install -f OpenDJ
script:
- mvn -B install
after_failure:
- echo 'remove build commits'
- git reset --hard $TRAVIS_COMMIT
- git push --quiet --force https://[email protected]/$TRAVIS_REPO_SLUG.git >/dev/null 2>&1