Skip to content

Commit

Permalink
Test circle ci push docker image (#86)
Browse files Browse the repository at this point in the history
* 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
leexgh authored Jan 3, 2024
1 parent fe1c834 commit a2fbaf2
Showing 1 changed file with 57 additions and 18 deletions.
75 changes: 57 additions & 18 deletions .circleci/config.yml
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: /.*/

0 comments on commit a2fbaf2

Please sign in to comment.