-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
50 lines (50 loc) · 2.39 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
language: python
install: gem install fpm
env:
global:
- VERSION_NUMBER="`cat package.json | grep version | grep -o '.[0-9]\.[0-9]\.[0-9]\+'`"
- BUILD_NUMBER=$TRAVIS_BUILD_NUMBER
- secure: "aIqQSgjsgzKkL8udhWhFvlpoCoR/MRvV2VfZAxbd/kuj8bqw/VINdnNbct4Lme5HUZJmzluhBIt72Ew0SvYeiPDyPtaxnx3bE7kiPQ7rmLNyy6aND4eJ+E/5mxJqcUvrV+wnm2WAo+1+t1RXRgzB7kvce6x8wIHf1+1bO2CMXB8="
- REAL_GIT_BRANCH="`git for-each-ref --format='%(objectname) %(refname:short)' refs/heads
| grep $TRAVIS_COMMIT | awk '{print $2}'`"
before_script:
- echo version_number $VERSION_NUMBER
- echo real_get_branch $REAL_GIT_BRANCH
- # echo "deb http://deb-repo.openrov.com/ stable debian" | sudo tee -a /etc/apt/sources.list
- # echo "deb http://deb-repo.openrov.com/ pre-release debian" | sudo tee -a /etc/apt/sources.list
- # echo "deb http://deb-repo.openrov.com/ development debian" | sudo tee -a /etc/apt/sources.list
- sudo wget -O - -q http://deb-repo.openrov.com/build.openrov.com.gpg.key | sudo apt-key add -
- echo "foreign-architecture armhf" | sudo tee -a /etc/dpkg/dpkg.cfg.d/architectures
- sudo cp preferences_$REAL_GIT_BRANCH /etc/apt/preferences
- # sudo apt-get update -q || true
script:
- bash generate_manifest.sh
- bash generate_package.sh
- mkdir suite
- cp manifest ./suite
- cp package.json ./suite
- bash make_package.sh
after_success:
- rm -rf OpenROV/build*
- mkdir build
- DEBFILE="`ls *.deb`"
- cp *.deb build/openrov-rov-suite_latest-${REAL_GIT_BRANCH}_armhf.deb
- mv *.deb build/
deploy:
provider: s3
access_key_id: AKIAIUN4NNHBKIOZE2JA
secret_access_key:
secure: FMLP1/dgTDQ2WvrqkXG1ebvtyIBCk7/1pliKitu35zgTmWmP9q0zn3MlcMr/ZURuyjycmYBvRF6NQ/HzYPV4Pp1sjKQ1AEaBQ4cpoRzX5Qc51ae1Yz05kVNLhbxxk9cu2VBwQr9F5VO5moZ3CfXbY5nOWJsJIA+99V9ARNDJ/aM=
bucket: openrov-software-nightlies
skip_cleanup: true
region: us-west-2
endpoint: bucket-name.s3-website-us-west-2.amazonaws.com
local-dir: build
upload-dir: openrov-rov-suite
acl: public_read
on:
repo: OpenROV/openrov-rov-suite
all_branches: true
condition: "($REAL_GIT_BRANCH = master )||($REAL_GIT_BRANCH = pre-release )||($REAL_GIT_BRANCH = stable)||($REAL_GIT_BRANCH = hotfix)"
after_deploy:
- curl -g http://build.openrov.com:8080/job/OpenROV-generic-upload-deb-to-repo/buildWithParameters -d token=$JENKINS_TOKEN_NAME -d urlToDebPackage=http://openrov-software-nightlies.s3-website-us-west-2.amazonaws.com/openrov-rov-suite%2F$DEBFILE -d branch=$REAL_GIT_BRANCH