Skip to content

Commit

Permalink
Merge pull request #26 from cancerit/feature/circle-ci
Browse files Browse the repository at this point in the history
Feature/circle ci
  • Loading branch information
gregoryleeman authored Nov 5, 2021
2 parents 3a12f96 + e95d146 commit d558e81
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 41 deletions.
71 changes: 71 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
version: 2.1
jobs:
build-test-push-job:
docker:
- image: circleci/buildpack-deps:stretch
environment:
IMAGE_NAME: quay.io/wtsicgp/dockstore-cgpmap
steps:
- checkout
- setup_remote_docker
- run:
name: Build Docker image
command: |
set -e
echo "Building Docker image"
docker build -t test .
- run:
name: Validate CWL files
command: |
set -e
echo "Validating CWL files"
sudo apt-get -y install python3-pip
pip3 install cwltool
cwltool --validate Dockstore.cwl
cwltool --validate cwls/cgpmap-bamBaiOut.cwl
cwltool --validate cwls/cgpmap-bamCsiOut.cwl
cwltool --validate cwls/cgpmap-cramOut.cwl
- run:
name: Verify inherited programs
command: |
set -e
echo 'Verifying programs inherited from cgpbigwig'
docker run --rm -t test bwjoin --version
echo 'Verifying programs inherited from pcap-core'
docker run --rm -t test bwa_mem.pl -version
docker run --rm -t test bammarkduplicates2 --version
docker run --rm -t test samtools --version
docker run --rm -t test bash -c 'bwa 2>&1 | grep Version'
- run:
name: Verify programs
command: |
set -e
echo 'Verify programs from dockstore-cgpmap'
docker run --rm -t test ds-cgpmap.pl -h
- run:
name: Push image to quay.io
command: |
set -e
BRANCH_OR_TAG="${CIRCLE_TAG:-$CIRCLE_BRANCH}"
if [ "$CIRCLE_TAG" = "$BRANCH_OR_TAG" ]; then
echo 'Pushing image'
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USER" --password-stdin
echo "$QUAYIO_PASSWORD" | docker login -u "$QUAYIO_USER" --password-stdin quay.io
CLEAN_BRANCH=$(echo $BRANCH_OR_TAG | tr / -)
docker tag test ${IMAGE_NAME}:${CLEAN_BRANCH}
docker push ${IMAGE_NAME}:${CLEAN_BRANCH}
else
echo "I am not a tag so not pushing image"
fi
workflows:
version: 2.1
build-test-push-workflow:
jobs:
- build-test-push-job:
context:
- dockerhub-casmservice
- quayio-casmservice
filters:
tags:
only: /.+/
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ packaged specifically for use with the [Dockstore.org](https://dockstore.org/) f

[![Quay Badge][quay-status]][quay-repo]

| Master | Develop |
| --------------------------------------------- | ----------------------------------------------- |
| [![Master Badge][travis-master]][travis-base] | [![Develop Badge][travis-develop]][travis-base] |
| Master | Develop |
| --- | --- |
| [![Master Badge][circleci-master-badge]][circleci-master] | [![Develop Badge][circleci-develop-badge]][circleci-develop] |

* [Supported input formats](#supported-input-formats)
* [Options for customisation:](#options-for-customisation)
Expand Down Expand Up @@ -65,7 +65,7 @@ This project is maintained using HubFlow.
1. Make appropriate changes
2. Bump version in `Dockerfile` and `cwls/mixins/requirements.yml`
3. Push changes
4. Check state on Travis
4. Check state on CircleCi
5. Generate the release (add notes to GitHub)
6. Confirm that image has been built on [quay.io][quay-builds]
7. Update the [dockstore][dockstore-cgpmap] entry, see [their docs][dockstore-get-started].
Expand Down Expand Up @@ -109,10 +109,11 @@ identical to a statement that reads ‘Copyright (c) 2005, 2006, 2007, 2008,
[pcap-core]: https://github.com/cancerit/PCAP-core
[github-wiki]: https://github.com/cancerit/dockstore-cgpmap/wiki

<!-- Travis -->
[travis-base]: https://travis-ci.org/cancerit/dockstore-cgpmap
[travis-master]: https://travis-ci.org/cancerit/dockstore-cgpmap.svg?branch=master
[travis-develop]: https://travis-ci.org/cancerit/dockstore-cgpmap.svg?branch=develop
<!-- CircleCi -->
[circleci-master-badge]: https://circleci.com/gh/cancerit/dockstore-cgpmap/tree/master.svg?style=svg
[circleci-master]: https://circleci.com/gh/cancerit/dockstore-cgpmap/tree/master
[circleci-develop-badge]: https://circleci.com/gh/cancerit/dockstore-cgpmap/tree/develop.svg?style=svg
[circleci-develop]: https://circleci.com/gh/cancerit/dockstore-cgpmap/tree/master

<!-- Gitter -->
[gitter-svg]: https://badges.gitter.im/dockstore-cgp/Lobby.svg
Expand Down

0 comments on commit d558e81

Please sign in to comment.