Commit 829c3bb0 authored by Alessandro Vullo's avatar Alessandro Vullo
Browse files

[ENSCORESW-2343]. Encrypt auth token and use it as a global variable.

parent ecf950ba
language: perl
perl:
- '5.14'
- '5.12'
- '5.10'
- '5.14'
- '5.12'
- '5.10'
env:
matrix:
- COVERALLS=true DB=mysql
- COVERALLS=false DB=mysql
- COVERALLS=false DB=sqlite
global:
secure: V4m6EvyHDDTbT/+NqteOGQbnHvrPUoVyXW02fLi/7/WckRroLqj4dmTHBEmQFdGDfYRS+/WkEijU2qNAe1A0Hlh79eWPvSZsiCTjEgt+0quNN+lYJGwKzLI27xM9YAXNCgVgpSsRLDcluf+bNHECKdpJPFL2TvgNa5vbbesxOHiUw8i4g/C66h4e8D2OnUdvNePfuSoqGpK2Q+lotQyQzI2nVjDsLtNc9VlGKB/EOKF9w5Ei/RYnxli58qG2gKLN8ut4oO8MAzCNfcLzfJFrqa43znW9HIhzw8JH2SQsBb6q1bXkLHB3Wu23w3G0bCgOVmrFzC/bxTdTOZBxGSAJjbEnMOjDqtNeMli5suRdo/5CvYQ42zVf9d0UxyX/AWuVicjKi6q4rujd/z55hm+Dyd5UBHjWg5QoeGqNYaU29hkLOTo9P4wKEvjdOF0ccU6lTad0I5nDSzRWfYAHcJWajE+Ms3TZ/dDZ2PfkPRLshEtufx++eEnKB1YMJaLi8e7A10RI9A8YZqerlk/Amo3C6aljCl4qA5G5ZBhuTGDgXXPxZC0xKQ72Myz/iKs3jrjbz2s3JFVQD0AamVBIE7HpprSGEc0uSXhSAuhtBINawcWod4ut/FbxP/de821BkRnEppt2n5bVdd530H88gQPiIcZ2ZlPf6tc7mXWGTFOoOeE=
sudo: false
......@@ -18,25 +21,23 @@ addons:
- unzip
before_install:
- git clone --branch master --depth 1 https://github.com/Ensembl/ensembl.git
- git clone -b bioperl-release-1-6-1 --depth 1 https://github.com/bioperl/bioperl-live.git
- git clone --branch master --depth 1 https://github.com/Ensembl/ensembl.git
- git clone -b bioperl-release-1-6-1 --depth 1 https://github.com/bioperl/bioperl-live.git
install:
- cpanm -v --installdeps --notest .
- cpanm -n Devel::Cover::Report::Coveralls
- cpanm -n DBD::SQLite
- cp travisci/MultiTestDB.conf.travisci.mysql modules/t/MultiTestDB.conf.mysql
- cp travisci/MultiTestDB.conf.travisci.SQLite modules/t/MultiTestDB.conf.SQLite
- mysql -u root -h localhost -e 'GRANT ALL PRIVILEGES ON *.* TO "travis"@"%"'
- cpanm -v --installdeps --notest .
- cpanm -n Devel::Cover::Report::Coveralls
- cpanm -n DBD::SQLite
- cp travisci/MultiTestDB.conf.travisci.mysql modules/t/MultiTestDB.conf.mysql
- cp travisci/MultiTestDB.conf.travisci.SQLite modules/t/MultiTestDB.conf.SQLite
- mysql -u root -h localhost -e 'GRANT ALL PRIVILEGES ON *.* TO "travis"@"%"'
script: "./travisci/harness.sh"
# Add build stage to trigger dependent builds, run sequentially after all test jobs
# specified by the build matrix expansion have completed successfully
jobs:
include:
- stage: trigger_dependent_builds
script: ./travisci/trigger-dependent-build.sh
- stage: trigger_dependent_builds
script: "./travisci/trigger-dependent-build.sh"
matrix:
exclude:
......@@ -50,10 +51,8 @@ matrix:
env: COVERALLS=false DB=sqlite
- perl: '5.14'
env: COVERALLS=true DB=mysql
notifications:
email:
on_success: always
on_failure: always
slack:
secure: gTcWzQsVHKPxRJ1u0U2l2+QVujmG1uFW44kAO3l46V5Im5uLTOLeM20ykk6ox4kaPHLs5ky7NGzcJmTDLaHBKjI4Sa34l4tJd0lhkv+hKj9TSv5pDDCdUX8v869Nm8LqJKh26HqvVcN7eHFRatLD/tfYvvkaP1rLLhwLLdr7czQ=
......@@ -33,14 +33,14 @@ endpoint=https://api.travis-ci.org
# Get this repo ID
repo_id () {
curl -s -X GET -H "Authorization: token $auth_token" -H "Travis-API-Version: 3" https://api.travis-ci.org/repo/$1 | python3 -c "import sys, json; print(json.load(sys.stdin)['id'])"
curl -s -X GET -H "Authorization: token $AUTH_TOKEN" -H "Travis-API-Version: 3" https://api.travis-ci.org/repo/$1 | python3 -c "import sys, json; print(json.load(sys.stdin)['id'])"
}
# Make an API request using the auth token set above. First argument is the path
# of the API method, all later arguments are passed to curl directly.
travis_api () {
curl -s $endpoint$1 \
-H "Authorization: token $auth_token" \
-H "Authorization: token $AUTH_TOKEN" \
-H 'Content-Type: application/json' \
-H 'Travis-API-Version: 3' \
"${@:2}"
......@@ -72,7 +72,7 @@ if [ "${TRAVIS_BRANCH}" != "master" ] || [ "${TRAVIS_PULL_REQUEST}" != "false" ]
fi
# The list of downstream dependent repos
dep_repos=("Ensembl%2Fensembl")
dep_repos=("avullo%2Fensembl")
for dep_repo in "${dep_repos[@]}"; do
# Get the ID of the dependent repo
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment