Skip to content

Commit 75872c8

Browse files
authored
Merge pull request #64 from broadinstitute/dp-trs-build
travis github staging fix
2 parents c1cf72a + 582ddc4 commit 75872c8

File tree

2 files changed

+44
-31
lines changed

2 files changed

+44
-31
lines changed

.travis.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- sudo apt-get update
3939
- sudo apt-get -y install shellcheck
4040
install:
41-
- pip3 install miniwdl
41+
- pip3 -q install miniwdl
4242
script:
4343
- travis/version-wdl-runtimes.sh
4444
- miniwdl check pipes/WDL/workflows/*.wdl
@@ -84,7 +84,7 @@ jobs:
8484
- sudo apt-get update
8585
- sudo apt-get -y install jq
8686
install:
87-
- pip3 install miniwdl
87+
- pip3 -q install miniwdl
8888
script:
8989
- travis/version-wdl-runtimes.sh
9090
- travis/tests-miniwdl.sh
@@ -112,26 +112,11 @@ jobs:
112112
env:
113113
- TRAVIS_JOB=deploy_github_staging
114114
install:
115-
- pip3 install miniwdl
115+
- pip3 -q install miniwdl
116116
script:
117-
- set -e -o pipefail
118-
- if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ]; then exit 0; fi
119-
- export VERSION=$(travis/list-docker-tags.sh | cut -f 2 -d ":" | tail -1); echo "version - $VERSION"
120-
- eval `ssh-agent`
121-
- travis/version-wdl-runtimes.sh
122-
- travis/flatten-wdls.sh > /dev/null
123117
- travis/github-viral-ngs-staging.sh
124-
- cd viral-ngs-staging
125-
- git checkout -B $TRAVIS_BRANCH
126-
- git remote -v
127-
- ssh-add -l -E md5
128-
- rm -rf *; cp -a ../pipes ../travis/github-staging/* .
129-
- ../travis/dockstoreyml.sh pipes/WDL/flattened/*.wdl > .dockstore.yml
130-
- git add -A -f
131-
- git commit -q -m "CI push github.com/broadinstitute/viral-pipelines:$VERSION"
132-
- git tag $VERSION
133-
- git push -f -u origin $TRAVIS_BRANCH
134-
- git push origin --tags
118+
after_failure:
119+
- sleep 10
135120

136121
- language: python
137122
stage: build
@@ -143,7 +128,7 @@ jobs:
143128
- set -e -o pipefail
144129
- openssl aes-256-cbc -K $encrypted_6def3e87f286_key -iv $encrypted_6def3e87f286_iv -in travis/viral-ngs-wdl.json.enc -out travis/viral-ngs-wdl.json -d
145130
- export DEST_DIR=`travis/list-docker-tags.sh | tail -1 | sed 's/:/\//'`
146-
- pip3 install miniwdl
131+
- pip3 -q install miniwdl
147132
- travis/version-wdl-runtimes.sh
148133
- travis/flatten-wdls.sh
149134
deploy:
@@ -164,7 +149,7 @@ jobs:
164149
# - TRAVIS_JOB=deploy_github
165150
# before_deploy:
166151
# - set -e
167-
# - pip3 install miniwdl
152+
# - pip3 -q install miniwdl
168153
# - travis/version-wdl-runtimes.sh
169154
# - travis/flatten-wdls.sh
170155
# deploy:

travis/github-viral-ngs-staging.sh

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,40 @@
11
#!/bin/bash
22
set -e -o pipefail
33

4-
openssl aes-256-cbc \
5-
-K $encrypted_fb18189f5cc1_key \
6-
-iv $encrypted_fb18189f5cc1_iv \
7-
-in travis/github-deploy-id_rsa.enc \
8-
-out travis/github-deploy-id_rsa \
9-
-d
10-
chmod 400 travis/github-deploy-id_rsa
11-
ssh-add travis/github-deploy-id_rsa
12-
git clone git@github.com:broadinstitute/viral-ngs-staging.git
4+
if [ -z "$TRAVIS_PULL_REQUEST_BRANCH" ]; then
5+
6+
travis/version-wdl-runtimes.sh
7+
travis/flatten-wdls.sh > /dev/null
8+
9+
VERSION=$(travis/list-docker-tags.sh | cut -f 2 -d ":" | tail -1); echo "version - $VERSION"
10+
11+
eval $(ssh-agent)
12+
openssl aes-256-cbc \
13+
-K $encrypted_fb18189f5cc1_key \
14+
-iv $encrypted_fb18189f5cc1_iv \
15+
-in travis/github-deploy-id_rsa.enc \
16+
-out travis/github-deploy-id_rsa \
17+
-d
18+
chmod 400 travis/github-deploy-id_rsa
19+
ssh-add travis/github-deploy-id_rsa
20+
ssh-add -l -E md5
21+
git clone git@github.com:broadinstitute/viral-ngs-staging.git
22+
23+
cd viral-ngs-staging
24+
if [ -z "$TRAVIS_TAG" ]; then
25+
git checkout -B $TRAVIS_BRANCH
26+
fi
27+
28+
rm -rf *; cp -a ../pipes ../travis/github-staging/* .
29+
../travis/dockstoreyml.sh pipes/WDL/flattened/*.wdl > .dockstore.yml
30+
git add -A -f
31+
git diff-index --quiet HEAD || git commit -q -m "CI push github.com/broadinstitute/viral-pipelines:$VERSION"
32+
33+
git tag $VERSION
34+
git push origin --tags
35+
36+
if [ -z "$TRAVIS_TAG" ]; then
37+
git push -f -u origin $TRAVIS_BRANCH
38+
fi
39+
40+
fi

0 commit comments

Comments
 (0)