Skip to content

Commit 466e8db

Browse files
author
Vladimir Kotal
committed
trigger Travis builds for OpenGrok/docker
1 parent bd2770a commit 466e8db

File tree

2 files changed

+86
-68
lines changed

2 files changed

+86
-68
lines changed

.travis.yml

Lines changed: 64 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,76 @@
11
language: java
22
cache:
33
directories:
4-
- '$HOME/.m2'
5-
- '$HOME/.sonar/cache'
4+
- "$HOME/.m2"
5+
- "$HOME/.sonar/cache"
66
env:
77
global:
8-
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
9-
# via the "travis encrypt" command using the project repo's public key
10-
- secure: "O_cda5pWDBAP-O3_0nG5RQ"
8+
- secure: O_cda5pWDBAP-O3_0nG5RQ
9+
- secure: AfVOBReF1weIKT/G0HivaZTnYia3nMCIjI7fkwTLQJnnzEVGQtqZSZJEmbobjUTh6j6gJE/KEEm56OubDylaA7xLHbxtJZAGBKZFq01x5EJ90qFnFrd6Jq2uCkppQzZB18Ai6Bk0Pun86OrGEfjzcBL7wmWuC6p0s31R9Yx68+c=
1110
addons:
1211
coverity_scan:
1312
project:
14-
name: "OpenGrok/OpenGrok"
15-
description: "Build submitted via Travis CI"
16-
branch_pattern: "coverity_scan"
17-
# build_command_prepend: "mvn clean"
18-
build_command: "mvn -DskipTests=true -Dmaven.javadoc.skip=false -B -V compile"
13+
name: OpenGrok/OpenGrok
14+
description: Build submitted via Travis CI
15+
branch_pattern: coverity_scan
16+
build_command: mvn -DskipTests=true -Dmaven.javadoc.skip=false -B -V compile
1917
sonarcloud:
20-
organization: "opengrok"
18+
organization: opengrok
2119
token:
22-
secure: "ayjmifQPQgKt/ICGfKtLpa8LwBAXZlxKwaPyjvXDRHyf3lbXGKkOCspH/wSoersoV4ZLt5UfSGKeFh1MS0IXAwUOcPTcV3/DUmycJjxZ5z9KjgGKsu0Spo1xZWioS+p1bzN6cJcNlwihE97idLhVSvDProf6L+pn0dqw8Lfz2k0="
20+
secure: ayjmifQPQgKt/ICGfKtLpa8LwBAXZlxKwaPyjvXDRHyf3lbXGKkOCspH/wSoersoV4ZLt5UfSGKeFh1MS0IXAwUOcPTcV3/DUmycJjxZ5z9KjgGKsu0Spo1xZWioS+p1bzN6cJcNlwihE97idLhVSvDProf6L+pn0dqw8Lfz2k0=
2321
jobs:
2422
include:
25-
- stage: test
26-
name: Linux + Oracle JDK 8
27-
os: linux
28-
dist: trusty
29-
sudo: required
30-
jdk: oraclejdk8
31-
install: true
32-
script: dev/main
33-
before_install: dev/before_install
34-
before_script: dev/before
35-
- stage: test
36-
name: Linux + Oracle JDK 11
37-
os: linux
38-
dist: trusty
39-
sudo: required
40-
jdk: oraclejdk11
41-
install: true
42-
script: dev/main
43-
before_install: dev/before_install
44-
before_script: dev/before
45-
- stage: test
46-
name: macOS + Oracle JDK 8
47-
os: osx
48-
osx_image: xcode8.3
49-
install: true
50-
script: dev/main
51-
before_install: dev/before_install
52-
before_script: dev/before
53-
- stage: deploy
54-
name: Github Release
55-
if: repo = "oracle/opengrok" AND tag IS present
56-
before_install: dev/before_install
57-
install: true
58-
script: mvn -DskipTests=true -Dmaven.javadoc.skip=false -B -V package
59-
deploy:
60-
# Pre-release
61-
- provider: releases
62-
name: $TRAVIS_TAG
63-
prerelease: true
64-
api_key:
65-
secure: bCywC9GdBIzLvLG3cgM9SgOAdMRQchmqEyKQZtIfK4iNzH3GjZwLMH91Oha0X3XU/n+nxGKw2E9qpYRzWlcbxHXqIgjFTt+hkt7zAldjjyWJnOcAYqdUDfsH3NqNQBqMBg8q7Bjc0LVS6PfpTpZliZISrL6KSyDprRg7C0S+HAk=
66-
file: distribution/target/opengrok-$TRAVIS_TAG.tar.gz
67-
skip_cleanup: true
68-
on:
69-
condition: $TRAVIS_TAG =~ rc[0-9]+$
70-
all_branches: true
71-
# Full release
72-
- provider: releases
73-
name: $TRAVIS_TAG
74-
api_key:
75-
secure: bCywC9GdBIzLvLG3cgM9SgOAdMRQchmqEyKQZtIfK4iNzH3GjZwLMH91Oha0X3XU/n+nxGKw2E9qpYRzWlcbxHXqIgjFTt+hkt7zAldjjyWJnOcAYqdUDfsH3NqNQBqMBg8q7Bjc0LVS6PfpTpZliZISrL6KSyDprRg7C0S+HAk=
76-
file: distribution/target/opengrok-$TRAVIS_TAG.tar.gz
77-
skip_cleanup: true
78-
on:
79-
condition: $TRAVIS_TAG =~ ^[0-9\.]+$
80-
all_branches: true
23+
- stage: test
24+
name: Linux + Oracle JDK 8
25+
os: linux
26+
dist: trusty
27+
sudo: required
28+
jdk: oraclejdk8
29+
install: true
30+
script: dev/main
31+
before_install: dev/before_install
32+
before_script: dev/before
33+
- stage: test
34+
name: Linux + Oracle JDK 11
35+
os: linux
36+
dist: trusty
37+
sudo: required
38+
jdk: oraclejdk11
39+
install: true
40+
script: dev/main
41+
before_install: dev/before_install
42+
before_script: dev/before
43+
- stage: test
44+
name: macOS + Oracle JDK 8
45+
os: osx
46+
osx_image: xcode8.3
47+
install: true
48+
script: dev/main
49+
before_install: dev/before_install
50+
before_script: dev/before
51+
- stage: deploy
52+
name: Github Release
53+
if: repo = "oracle/opengrok" AND tag IS present
54+
before_install: dev/before_install
55+
install: true
56+
script: dev/pre-deploy.sh
57+
deploy:
58+
- provider: releases
59+
name: "$TRAVIS_TAG"
60+
prerelease: true
61+
api_key:
62+
secure: bCywC9GdBIzLvLG3cgM9SgOAdMRQchmqEyKQZtIfK4iNzH3GjZwLMH91Oha0X3XU/n+nxGKw2E9qpYRzWlcbxHXqIgjFTt+hkt7zAldjjyWJnOcAYqdUDfsH3NqNQBqMBg8q7Bjc0LVS6PfpTpZliZISrL6KSyDprRg7C0S+HAk=
63+
file: distribution/target/opengrok-$TRAVIS_TAG.tar.gz
64+
skip_cleanup: true
65+
on:
66+
condition: "$TRAVIS_TAG =~ rc[0-9]+$"
67+
all_branches: true
68+
- provider: releases
69+
name: "$TRAVIS_TAG"
70+
api_key:
71+
secure: bCywC9GdBIzLvLG3cgM9SgOAdMRQchmqEyKQZtIfK4iNzH3GjZwLMH91Oha0X3XU/n+nxGKw2E9qpYRzWlcbxHXqIgjFTt+hkt7zAldjjyWJnOcAYqdUDfsH3NqNQBqMBg8q7Bjc0LVS6PfpTpZliZISrL6KSyDprRg7C0S+HAk=
72+
file: distribution/target/opengrok-$TRAVIS_TAG.tar.gz
73+
skip_cleanup: true
74+
on:
75+
condition: "$TRAVIS_TAG =~ ^[0-9\\.]+$"
76+
all_branches: true

dev/pre-deploy.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
# Create distribution that will be uploaded to Github release.
4+
mvn -DskipTests=true -Dmaven.javadoc.skip=false -B -V package
5+
6+
# Trigger Travis build of the OpenGrok/docker repository.
7+
echo "Triggering Travis build of OpenGrok/docker repository"
8+
9+
body='{
10+
"request": {
11+
"branch":"master"
12+
}}'
13+
14+
if [ -n "$TRAVIS_TOKEN" ]; then
15+
curl -s -X POST \
16+
-H "Content-Type: application/json" \
17+
-H "Accept: application/json" \
18+
-H "Travis-API-Version: 3" \
19+
-H "Authorization: token $TRAVIS_TOKEN" \
20+
-d "$body" \
21+
https://api.travis-ci.com/repo/OpenGrok%2Fdocker/requests
22+
fi

0 commit comments

Comments
 (0)