This repository has been archived by the owner on Jan 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake-travis.sh
executable file
·63 lines (51 loc) · 1.59 KB
/
make-travis.sh
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
#!/bin/bash
#
# write .travis.yml file to working dir
#
if [ ! -d .git ]; then
echo "working dir isn't a git repository" >&2
exit 1
fi
if [ ! -f ~/.make-travis.conf ]; then
echo "~/.make-travis.conf does not exist" >&2
exit 1
fi
source ~/.make-travis.conf
if [ -f .travis.yml ]; then
echo "overwriting existing .travis.yml" >&2
fi
username=`travis encrypt --no-interactive --skip-version-check "CI_DEPLOY_USERNAME='${username}'"`
password=`travis encrypt --no-interactive --skip-version-check "CI_DEPLOY_PASSWORD='${password}'"`
hipchat=`travis encrypt --no-interactive --skip-version-check "${token}@${room}"`
cat > .travis.yml <<TEMPLATE
# .travis.yml file generated by make-travis.sh
# deploy Maven artifacts to Sonatype OSS repo
language: java
jdk:
- oraclejdk8
- openjdk7
# checkout settings
before_install:
- "git clone -b master https://github.com/molindo/travis-settings.git target/travis-settings"
- "target/travis-settings/tasks/before_install.sh"
# install and deploy
install: "target/travis-settings/tasks/install.sh"
script: "target/travis-settings/tasks/script.sh"
# travis encrypt 'token@room'
notifications:
email: false
hipchat:
rooms:
- secure: ${hipchat}
template:
- '%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} (<a href="%{build_url}">Details</a>/<a href="%{compare_url}">Change view</a>)'
format: html
on_success: always
on_failure: always
# travis encrypt 'CI_DEPLOY_USERNAME=username'
# travis encrypt 'CI_DEPLOY_PASSWORD=password'
env:
global:
- secure: ${username}
- secure: ${password}
TEMPLATE