forked from yaronp68/cosmo-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
69 lines (60 loc) · 2.87 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
language: java
jdk:
- openjdk7
before_script:
- "gem install travis-artifacts"
- "wget http://aphyr.com/riemann/riemann_0.2.2_all.deb"
- "sudo dpkg -i riemann_0.2.2_all.deb"
- "sudo touch /var/log/riemann/riemann.log"
- "sudo chmod 666 /var/log/riemann/riemann.log"
install:
# !!! WARNING: NEVER USE THE mvn -X SWITCH AS IT LOGS THE SECRET KEY ENV VARIABLES !!!
- "mvn install -DskipTests -f travis-pom.xml"
script:
# !!! WARNING: NEVER USE THE mvn -X SWITCH AS IT LOGS THE SECRET KEY ENV VARIABLES !!!
- "mvn verify -f travis-pom.xml"
after_success:
- "cd orchestrator;mvn install -Pall"
- "test ${TRAVIS_BRANCH} = develop && travis-artifacts upload --path $HOME/.m2/repository/org/cloudifysource/cosmo/bootstrapper --target-path travisci"
- "test ${TRAVIS_BRANCH} = develop && travis-artifacts upload --path $HOME/.m2/repository/org/cloudifysource/cosmo/orchestrator --target-path travisci"
- "test ${TRAVIS_BRANCH} = develop && travis-artifacts upload --path $HOME/.m2/repository/org/cloudifysource/cosmo/state-cache --target-path travisci"
env:
global:
- "ARTIFACTS_AWS_REGION=us-east-1"
- "ARTIFACTS_S3_BUCKET=cosmo-snapshot-maven-repository"
- secure: "ZFXmjFGg7wHA+u/8HmhAop6Y4zRJIHdVPvWrYHN3zlV5MuaG/5Zfr7HTzVyK\nGirLlRK3g0trDNnkNWYbnu4gfP1V7sPxv+G9HcP0Ig1hr13Xlh8u0u0yCFjp\nD/fW8nndIPNNi+7xT6KZMhUt+oNxEA31rY4dIVGoU7oHCebhD5U="
- secure: "bXHI5aPs5VROGRwm44wPT49YzU8oSJ4Y82sl5SyAg7oalRPHeTdm2tv+cjx5\nxRaw9BW0CMYycbqQl3Bt8BuPfaQKgNpGdweJTFSdDKNB/rH0qnqFdBYLtbL3\nOv0UJp04XGUidfDjzCtS7uhrF5p/UFKewoFGaYuelasZ0wfCKFU="
# Comments:
#
# Don't use your direct AWS credentials. Create limited credentials with Amazon IAM. Here are is the relevant group policy for IAM:
#
#
# {
# "Version": "2012-10-17",
# "Statement": [
# {
# "Effect": "Allow",
# "Action": [
# "s3:GetObject*", "s3:PutObject*", "s3:DeleteObject*"
# ],
# "Resource": [ "arn:aws:s3:::cosmo-snapshot-maven-repository/*" ]
# },
# {
# "Effect": "Allow",
# "Action": [
# "s3:ListBucket"
# ],
# "Resource": [ "arn:aws:s3:::cosmo-snapshot-maven-repository" ]
# }
# ]
# }
#
# Encrypting Credentials: http://about.travis-ci.org/docs/user/build-configuration/#Secure-environment-variables
# travis encrypt -r CloudifySource/cosmo-manager ARTIFACTS_AWS_ACCESS_KEY_ID=xxxxx
# travis encrypt -r CloudifySource/cosmo-manager ARTIFACTS_AWS_SECRET_ACCESS_KEY=xxxxx
# How to upload travis artifacts:
# https:# github.com/travis-ci/travis-artifacts
# http://stackoverflow.com/questions/16406727/how-to-upload-travis-artifacts-to-s3-only-in-develop-branch/16406929?noredirect=1#16406929
#
# How to find local maven repo: http:# stackoverflow.com/questions/5916157/how-to-get-the-maven-local-repo
# Do not use mvn -X switch as it exposes the environment variables and exposes the secret key.