mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Maxim Thomas
18.03.2018 bf5637720d949b64124be0f07285dd9d15a59c41
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
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 "open-identity-platform-opendj@googlegroups.com"
      - git checkout -f $TRAVIS_BRANCH
      - git tag -f $git_version && git tag -d $git_version
      - mvn -q -B -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://$GITHUBKEY@github.com/$TRAVIS_REPO_SLUG.git >/dev/null 2>&1
      - git push --quiet --force https://$GITHUBKEY@github.com/$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: 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"
        - "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://$GITHUBKEY@github.com/$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://$GITHUBKEY@github.com/$TRAVIS_REPO_SLUG.wiki.git >/dev/null 2>&1
      -   git push --quiet --force https://$GITHUBKEY@github.com/$TRAVIS_REPO_SLUG.wiki.git $git_version >/dev/null 2>&1 
      -   cd $TRAVIS_BUILD_DIR
      - echo 'build and push Docker'
      -   docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
      -   docker build ./opendj-packages/opendj-docker/target -t $DOCKER_USERNAME/opendj -t $DOCKER_USERNAME/opendj:$git_version
      -   docker push $DOCKER_USERNAME/opendj:$git_version
      -   docker push $DOCKER_USERNAME/opendj
  - os: linux
    jdk: oraclejdk8
  - os: osx
    osx_image: xcode9.1
    env: 
      - WINEPREFIX=~/.wine32 WINEARCH=win32 # wine on mac hangs
  allow_failures:
  - os: osx
branches:
  except:
    - /[0-9]+\.[0-9]+\.[0-9]+$/
notifications:
  email:
  - open-identity-platform-opendj@googlegroups.com
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)"
  - 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 forgerock-parent
script:
  - echo "mvn -B install $INSTALL_SUFFIX"
  - eval "mvn -B install $INSTALL_SUFFIX"