Skip to content

Commit 4c5cc59

Browse files
author
Vladimir Kotal
committed
add post-deploy stage
1 parent 466e8db commit 4c5cc59

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,8 @@ jobs:
7474
on:
7575
condition: "$TRAVIS_TAG =~ ^[0-9\\.]+$"
7676
all_branches: true
77+
- stage: post_deploy
78+
name: Post deploy
79+
if: repo = "oracle/opengrok" AND tag IS present
80+
script: dev/post-deploy.sh
81+
install: true

dev/post-deploy.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Trigger Travis build of the OpenGrok/docker repository.
4+
echo "Triggering Travis build of OpenGrok/docker repository"
5+
6+
body='{
7+
"request": {
8+
"branch":"master"
9+
}}'
10+
11+
if [ -n "$TRAVIS_TOKEN" ]; then
12+
curl -s -X POST \
13+
-H "Content-Type: application/json" \
14+
-H "Accept: application/json" \
15+
-H "Travis-API-Version: 3" \
16+
-H "Authorization: token $TRAVIS_TOKEN" \
17+
-d "$body" \
18+
https://api.travis-ci.com/repo/OpenGrok%2Fdocker/requests
19+
fi

dev/pre-deploy.sh

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,3 @@
22

33
# Create distribution that will be uploaded to Github release.
44
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)