forked from OpenIdentityPlatform/OpenDJ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
102 lines (102 loc) · 5.51 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
language: java
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 -B -DtagNameFormat="$git_version" -DreleaseVersion="$git_version" -DignoreSnapshots=true -DpushChanges=false -DscmCommentPrefix="[ci skip] $git_version_last->$git_version " -DskipTests -Darguments=-DskipTests -Dresume=false -P distribution 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
- export compare="$(git rev-list -n 1 $git_version_last)...$(git rev-list -n 1 $git_version)"
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
api_key:
secure: bprK7kiogA+nA4TuYU7BHHIPasg2Ve7dG/eZRQ+mJpH2y6GXFBqoEpN2AQECrJ5IgVQZ9WyBc+/PXhjh/VYrg3bvU9lE2zTnkQa5kiPFGnC5cOmqO2dSdUjiBcm3yBO9J3pL//Qsr8g7fv9g5580yMW/NYMs0R70S5ystqjJFSFQHXLkWJBzXQnIyMqjPNsndmqR9lnqX690u298z9H56pNrZqK851NVjTX9WKIoWlVezCSp3nwvAD5tW+p1A0Sy/6kPheYyudEHvHO5zUe33vh3lxB/qqXzIszlEPvIzzcig/ElxTCQ+4eWL34MlGLUzeJ8DdR7JshIPkTrAQ9i5nbOIP0NLu5wfNh642Sl4diGqa+7ioAmhIQuQmBJcOb0l9pP01fLVmgJoPVLGctWpklB9FdNCu96EtHmqj6FmsQzSTpmkfhCjRrgPHQYTZNcl25xdN6GSYZpiP2fYSmp06Wz2mi2OO2gvwjU2iX2b8j/koJ8kWQHrCYamTKbu4X08Vd+lE3EupTBfBzmiPiu8pC5PRi+nmilKdg40lsga++HB3IRRoPYhULo29Yfh6kMmWrP4Pn7RFOyI0Jm5NhLlZW2A5Q+FpEr8qyiLV1eC5RxMlAdaqassz2aWgwxrJC2taF0gUnZbg6w0xa5O0UAl0VAAGAJb2cXl9yJDCkYL18=
skip_cleanup: true
overwrite: true
file_glob: true
file:
- "opendj-server-legacy/target/package/*.zip"
- "opendj-ldap-toolkit/target/*.zip"
- "opendj-packages/opendj-deb/opendj-deb-standard/target/*.deb"
- "opendj-packages/opendj-rpm/opendj-rpm-standard/target/rpm/opendj/RPMS/noarch/*.rpm"
- "opendj-packages/opendj-msi/opendj-msi-standard/target/*.msi"
- "opendj-packages/opendj-docker/target/Dockerfile.zip"
- "opendj-packages/opendj-openshift-template/*.yaml"
- "opendj-doc-generated-ref/target/*.zip"
- "opendj-dsml-servlet/target/*.war"
- "opendj-rest2ldap-servlet/target/*.war"
on:
repo: OpenIdentityPlatform/OpenDJ
tags: false
branch:
- master
- travis
after_deploy:
- echo 'after_deploy'
- echo 'publish docs in wiki'
- git clone https://[email protected]/$TRAVIS_REPO_SLUG.wiki.git ../wiki >/dev/null 2>&1
- rm -rf ../wiki/docbkx; mv opendj-doc-generated-ref/target/docbkx ../wiki;
- cd ../wiki; git add -A; git commit -a -m "upload docs after deploy $git_version"; git tag -f $git_version
- git push --quiet --force https://[email protected]/$TRAVIS_REPO_SLUG.wiki.git >/dev/null 2>&1
- git push --quiet --force https://[email protected]/$TRAVIS_REPO_SLUG.wiki.git $git_version >/dev/null 2>&1
- cd $TRAVIS_BUILD_DIR
- echo 'build and push Docker'
- echo "$DOCKER_PASSWORD" | docker login -u "openidentityplatformcommunity" --password-stdin
- docker build ./opendj-packages/opendj-docker -t openidentityplatform/opendj -t openidentityplatform/opendj:$git_version
- docker push openidentityplatform/opendj:$git_version
- docker push openidentityplatform/opendj
- echo 'build and push Github Docker'
- echo "$GITHUBKEY" | docker login -u "Open Identity Platform Community" docker.pkg.github.com --password-stdin
- docker build ./opendj-packages/opendj-docker -t docker.pkg.github.com/openidentityplatform/opendj/opendj -t docker.pkg.github.com/openidentityplatform/opendj/opendj:$git_version
- docker push docker.pkg.github.com/openidentityplatform/opendj/opendj:$git_version
- docker push docker.pkg.github.com/openidentityplatform/opendj/opendj
- os: linux
jdk: oraclejdk11
- os: linux
jdk: openjdk11
- os: osx
osx_image: xcode9.3
env:
- WINEPREFIX=~/.wine32 WINEARCH=win32 # wine on mac hangs
- os: osx
osx_image: xcode10.1
env:
- WINEPREFIX=~/.wine32 WINEARCH=win32 # wine on mac hangs
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 && brew cask install wine-stable; else sudo apt-get install -y rpm && sudo dpkg --add-architecture i386 && wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add - && sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main' && sudo apt update && sudo apt install --install-recommends winehq-stable ; fi
- git fetch -t
- export git_version_last="$(git describe --abbrev=0 --tags)"
- 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^`..HEAD --oneline
install:
- #mvn -q -B -V -DskipTests -Dmaven.javadoc.skip=true install -f commons
script:
- echo "mvn -B install $INSTALL_SUFFIX"
- eval "mvn -B install $INSTALL_SUFFIX"