Last active
November 6, 2015 00:41
-
-
Save aheuermann/1112e527a545a9e71216 to your computer and use it in GitHub Desktop.
DotCi using COMPOSE_PROJECT_NAME
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
before: before.sh | |
run: | |
node: "grunt test" | |
golang: "go test -v ./..." |
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
#Before COMPOSE_PROJECT_NAME PR | |
#JOB_NAME=org/project/script=node BUILD_NUMBER=8 | |
#do some magic string manipulation to turn the above variables into the following | |
PROJECT=nodeorgproject8 | |
docker-compose -p $PROJECT up database | |
docker-compose -p $PROJECT run --rm db_migration | |
docker-compose -p $PROJECT stop database | |
#AFTER COMPOSE_PROJECT_NAME PR | |
#We don't have to pass -p because it is read from env variable | |
docker-compose up database | |
docker-compose run --rm node sh -xc "grunt migrate_db" | |
docker-compose stop database | |
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
database: | |
image: postgres | |
node: | |
build . | |
links: | |
- database | |
golang: | |
build: ./go/ | |
links: | |
- database |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment