-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test circle ci push docker image (#86)
* Test circle ci push docker image * update * update * update * update * update * update * update * update * update * update tag * trigger build * new tag * another new tag * another new tag * update * update * update * update * update * update * update * update * update
- Loading branch information
Showing
1 changed file
with
57 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,63 @@ | ||
version: 2 | ||
version: 2.1 | ||
# jobs: | ||
# build: | ||
# working_directory: ~/repo | ||
# docker: | ||
# - image: circleci/python:3.6.1 | ||
# steps: | ||
# - checkout | ||
# - restore_cache: | ||
# key: deps1-{{ .Branch }}-{{ checksum "scripts/requirements.txt" }} | ||
# - run: | ||
# command: | | ||
# python3 -m venv venv | ||
# . venv/bin/activate | ||
# pip install -r scripts/requirements.txt | ||
# - save_cache: | ||
# key: deps1-{{ .Branch }}-{{ checksum "scripts/requirements.txt" }} | ||
# paths: | ||
# - "venv" | ||
# - run: | ||
# command: | | ||
# . venv/bin/activate | ||
# cd scripts | ||
# nosetests | ||
|
||
jobs: | ||
build: | ||
working_directory: ~/repo | ||
build_and_publish_grch37_mutationassessor: | ||
docker: | ||
- image: circleci/python:3.6.1 | ||
- image: cimg/go:1.17 | ||
# large is the best image for free tier users | ||
resource_class: large | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: deps1-{{ .Branch }}-{{ checksum "scripts/requirements.txt" }} | ||
- run: | ||
command: | | ||
python3 -m venv venv | ||
. venv/bin/activate | ||
pip install -r scripts/requirements.txt | ||
- save_cache: | ||
key: deps1-{{ .Branch }}-{{ checksum "scripts/requirements.txt" }} | ||
paths: | ||
- "venv" | ||
# ... steps for building/testing app ... | ||
- run: | ||
name: Get Git tag | ||
command: | | ||
. venv/bin/activate | ||
cd scripts | ||
nosetests | ||
git fetch --tags | ||
echo 'export GIT_TAG=$(git describe --tags $(git rev-list --tags --max-count=1) | sed 's/^v//g')' >> "$BASH_ENV" | ||
source "$BASH_ENV" | ||
echo $GIT_TAG | ||
- setup_remote_docker: | ||
docker_layer_caching: true | ||
|
||
# build and push Docker image | ||
# For test only, change to genomenexus docker account!!! | ||
- run: | | ||
TAG=${GIT_TAG}_mutationassessor | ||
IMAGE=leexdocker/gn-mongodb | ||
docker build -t $IMAGE:$TAG --build-arg MUTATIONASSESSOR=true . | ||
echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin | ||
docker push $IMAGE:$TAG | ||
workflows: | ||
build: | ||
jobs: | ||
- build_and_publish_grch37_mutationassessor: | ||
filters: | ||
branches: | ||
ignore: | ||
- /.*/ | ||
tags: | ||
only: /.*/ |