Skip to content

Commit

Permalink
Merge pull request #64 from broadinstitute/dp-trs-build
Browse files Browse the repository at this point in the history
travis github staging fix
  • Loading branch information
dpark01 authored May 12, 2020
2 parents c1cf72a + 582ddc4 commit 75872c8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 31 deletions.
29 changes: 7 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- sudo apt-get update
- sudo apt-get -y install shellcheck
install:
- pip3 install miniwdl
- pip3 -q install miniwdl
script:
- travis/version-wdl-runtimes.sh
- miniwdl check pipes/WDL/workflows/*.wdl
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- sudo apt-get update
- sudo apt-get -y install jq
install:
- pip3 install miniwdl
- pip3 -q install miniwdl
script:
- travis/version-wdl-runtimes.sh
- travis/tests-miniwdl.sh
Expand Down Expand Up @@ -112,26 +112,11 @@ jobs:
env:
- TRAVIS_JOB=deploy_github_staging
install:
- pip3 install miniwdl
- pip3 -q install miniwdl
script:
- set -e -o pipefail
- if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ]; then exit 0; fi
- export VERSION=$(travis/list-docker-tags.sh | cut -f 2 -d ":" | tail -1); echo "version - $VERSION"
- eval `ssh-agent`
- travis/version-wdl-runtimes.sh
- travis/flatten-wdls.sh > /dev/null
- travis/github-viral-ngs-staging.sh
- cd viral-ngs-staging
- git checkout -B $TRAVIS_BRANCH
- git remote -v
- ssh-add -l -E md5
- rm -rf *; cp -a ../pipes ../travis/github-staging/* .
- ../travis/dockstoreyml.sh pipes/WDL/flattened/*.wdl > .dockstore.yml
- git add -A -f
- git commit -q -m "CI push github.com/broadinstitute/viral-pipelines:$VERSION"
- git tag $VERSION
- git push -f -u origin $TRAVIS_BRANCH
- git push origin --tags
after_failure:
- sleep 10

- language: python
stage: build
Expand All @@ -143,7 +128,7 @@ jobs:
- set -e -o pipefail
- 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
- export DEST_DIR=`travis/list-docker-tags.sh | tail -1 | sed 's/:/\//'`
- pip3 install miniwdl
- pip3 -q install miniwdl
- travis/version-wdl-runtimes.sh
- travis/flatten-wdls.sh
deploy:
Expand All @@ -164,7 +149,7 @@ jobs:
# - TRAVIS_JOB=deploy_github
# before_deploy:
# - set -e
# - pip3 install miniwdl
# - pip3 -q install miniwdl
# - travis/version-wdl-runtimes.sh
# - travis/flatten-wdls.sh
# deploy:
Expand Down
46 changes: 37 additions & 9 deletions travis/github-viral-ngs-staging.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
#!/bin/bash
set -e -o pipefail

openssl aes-256-cbc \
-K $encrypted_fb18189f5cc1_key \
-iv $encrypted_fb18189f5cc1_iv \
-in travis/github-deploy-id_rsa.enc \
-out travis/github-deploy-id_rsa \
-d
chmod 400 travis/github-deploy-id_rsa
ssh-add travis/github-deploy-id_rsa
git clone git@github.com:broadinstitute/viral-ngs-staging.git
if [ -z "$TRAVIS_PULL_REQUEST_BRANCH" ]; then

travis/version-wdl-runtimes.sh
travis/flatten-wdls.sh > /dev/null

VERSION=$(travis/list-docker-tags.sh | cut -f 2 -d ":" | tail -1); echo "version - $VERSION"

eval $(ssh-agent)
openssl aes-256-cbc \
-K $encrypted_fb18189f5cc1_key \
-iv $encrypted_fb18189f5cc1_iv \
-in travis/github-deploy-id_rsa.enc \
-out travis/github-deploy-id_rsa \
-d
chmod 400 travis/github-deploy-id_rsa
ssh-add travis/github-deploy-id_rsa
ssh-add -l -E md5
git clone git@github.com:broadinstitute/viral-ngs-staging.git

cd viral-ngs-staging
if [ -z "$TRAVIS_TAG" ]; then
git checkout -B $TRAVIS_BRANCH
fi

rm -rf *; cp -a ../pipes ../travis/github-staging/* .
../travis/dockstoreyml.sh pipes/WDL/flattened/*.wdl > .dockstore.yml
git add -A -f
git diff-index --quiet HEAD || git commit -q -m "CI push github.com/broadinstitute/viral-pipelines:$VERSION"

git tag $VERSION
git push origin --tags

if [ -z "$TRAVIS_TAG" ]; then
git push -f -u origin $TRAVIS_BRANCH
fi

fi

0 comments on commit 75872c8

Please sign in to comment.