-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: configure Travis CI for branch 'dev'
- Loading branch information
Showing
8 changed files
with
77 additions
and
73 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,31 +1,38 @@ | ||
sudo: required | ||
|
||
dist: xenial | ||
|
||
service: | ||
- docker | ||
|
||
os: | ||
- linux | ||
dist: bionic | ||
language: python | ||
services: | ||
- docker | ||
install: | ||
# omit automatic installation of dependencies in virtualenv | ||
- pip --version | ||
stages: | ||
- if: branch = master | ||
name: master build | ||
- if: branch = dev | ||
name: dev build | ||
- name: branch build | ||
|
||
- name: test | ||
- name: publish | ||
# do not execute if PR branch | ||
if: type != pull_request | ||
branches: | ||
only: | ||
- dev | ||
jobs: | ||
include: | ||
- stage: master build | ||
- stage: test | ||
name: Build, deploy and test application | ||
script: | ||
- version=0.1 | ||
- docker build -t weselixir/elixir-wes-app:"$version" -t weselixir/elixir-wes-app:master . | ||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
- if [ "$TRAVIS_PULL_REQUEST" = false ]; then docker push "$DOCKER_REPO_NAME":"$version"; fi | ||
- stage: dev build | ||
# build and deploy application | ||
- "docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml up --build -d" | ||
# test if endpoint 'GET /runs' is accessible | ||
- "test $(curl -sL -w '%{http_code}' -X GET --header 'Accept: application/json' 'http://localhost:7777/ga4gh/wes/v1/runs' -o /dev/null) == '200'" | ||
- stage: publish | ||
name: Push image to registry | ||
env: | ||
- secure: "woVF7L1vADo4OqyKm7Kq8PC95Ej4L1q3R4Gf0Uh9p1tA81JMfD/3HDS5dG3OQvjoftcA7PqpFTrZq6GL1hR/bQqoQypHVNziH9PnDZFJPvxIYa8BUV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jl7m7wCba+SwEU29/dow65JlLsCwUUHhEexXDRn9GO09Ci6OR+EhtCtsS7cXTS/1rOIaiUfvB7ciu5BjqdnSxJ1WkAEDaut32l4/1mfNfTg0eSmsHPs//oPsXb4NZU/f4oeXJvvVmG1PTx7mOwGnSokZT8iI+rk3ULCyf+lz0JNQy7Jx5mb+kEqI=" | ||
script: | ||
- docker build -t weselixir/elixir-wes-app:dev -t weselixir/elixir-wes-app:build-"$TRAVIS_BUILD_NUMBER" . | ||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
- if [ "$TRAVIS_PULL_REQUEST" = false ]; then docker push "$DOCKER_REPO_NAME":build-"$TRAVIS_BUILD_NUMBER"; fi | ||
- stage: branch build | ||
script: | ||
- docker build -t weselixir/elixir-wes-app-branched:build-"$TRAVIS_BUILD_NUMBER" . | ||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
# build and tag app image | ||
- docker build -t "$DOCKER_REPO_NAME":"$DOCKER_REPO_TAG" . | ||
# log in | ||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
# push image | ||
- docker push "$DOCKER_REPO_NAME":"$DOCKER_REPO_TAG" |
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,24 @@ | ||
version: '3.6' | ||
services: | ||
|
||
celery-worker-wes-elixir: | ||
environment: | ||
- WES_CONFIG=/app/wes_elixir/config/override/app_config.dev.yaml | ||
|
||
wes-elixir: | ||
environment: | ||
- WES_CONFIG=/app/wes_elixir/config/override/app_config.dev.yaml | ||
ports: | ||
- "7777:8080" | ||
|
||
rabbit-wes-elixir: | ||
wes-elixir-worker: | ||
environment: | ||
- WES_CONFIG=/app/wes_elixir/config/override/app_config.dev.yaml | ||
|
||
rabbit: | ||
ports: | ||
- "5672:5672" | ||
|
||
mongo-wes-elixir: | ||
mongo: | ||
ports: | ||
- "27017:27017" | ||
|
||
flower-wes-elixir: | ||
flower: | ||
ports: | ||
- "5555:5555" |
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,20 +1,20 @@ | ||
version: '3.6' | ||
services: | ||
|
||
celery-worker-wes-elixir: | ||
environment: | ||
- WES_CONFIG=/app/wes_elixir/config/override/app_config.prod.yaml | ||
|
||
wes-elixir: | ||
environment: | ||
- WES_CONFIG=/app/wes_elixir/config/override/app_config.prod.yaml | ||
ports: | ||
- "80:8080" | ||
|
||
rabbit-wes-elixir: | ||
wes-elixir-worker: | ||
environment: | ||
- WES_CONFIG=/app/wes_elixir/config/override/app_config.prod.yaml | ||
|
||
rabbit: | ||
ports: | ||
- "5672:5672" | ||
|
||
mongo-wes-elixir: | ||
mongo: | ||
ports: | ||
- "27017:27017" |
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,48 +1,46 @@ | ||
version: '3.6' | ||
services: | ||
|
||
celery-worker-wes-elixir: | ||
image: wes-elixir:latest | ||
wes-elixir: | ||
image: elixircloud/wes-elixir:latest | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
restart: unless-stopped | ||
links: | ||
- mongo-wes-elixir | ||
- rabbit-wes-elixir | ||
command: bash -c "cd /app/wes_elixir; celery worker -A celery_worker -E --loglevel=info" | ||
- mongo | ||
command: bash -c "cd /app/wes_elixir; gunicorn -c config.py wsgi:app" | ||
volumes: | ||
- ../data/wes_elixir:/data | ||
- /wes/vol:/tmp | ||
- ../../data/wes_elixir:/data | ||
|
||
wes-elixir: | ||
image: wes-elixir:latest | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
wes-elixir-worker: | ||
image: elixircloud/wes-elixir:latest | ||
restart: unless-stopped | ||
depends_on: | ||
- wes-elixir | ||
links: | ||
- mongo-wes-elixir | ||
command: bash -c "cd /app/wes_elixir; gunicorn -c config.py wsgi:app" | ||
- mongo | ||
- rabbit | ||
command: bash -c "cd /app/wes_elixir; celery worker -A celery_worker -E --loglevel=info" | ||
volumes: | ||
- ../data/wes_elixir:/data | ||
- ../../data/wes_elixir:/data | ||
|
||
rabbit-wes-elixir: | ||
rabbit: | ||
image: "rabbitmq:3-management" | ||
hostname: "rabbit" | ||
restart: unless-stopped | ||
links: | ||
- mongo-wes-elixir | ||
- mongo | ||
|
||
mongo-wes-elixir: | ||
mongo: | ||
image: mongo:3.2 | ||
restart: unless-stopped | ||
volumes: | ||
- ../data/wes_elixir/db:/data/db | ||
- ../../data/wes_elixir/db:/data/db | ||
|
||
flower-wes-elixir: | ||
flower: | ||
image: mher/flower:0.9 | ||
restart: unless-stopped | ||
links: | ||
- celery-worker-wes-elixir | ||
command: flower --broker=amqp://guest:guest@rabbit-wes-elixir:5672// --port=5555 | ||
- wes-elixir-worker | ||
command: flower --broker=amqp://guest:guest@rabbit:5672// --port=5555 |
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
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
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
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