forked from saleor/saleor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
43 additions
and
39 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: /app | ||
docker: | ||
- image: docker:17.09.0-ce-git | ||
steps: | ||
- checkout | ||
- setup_remote_docker: | ||
docker_layer_caching: true | ||
- run: | ||
name: Set version | ||
command: | | ||
sed -i.bak "s#'dev'#'$(git describe --tags)'#" saleor/__init__.py | ||
- run: | ||
name: Build application Docker image | ||
command: | | ||
docker build --cache-from=mirumee/saleor:latest -t mirumee/saleor:latest . | ||
environment: | ||
STATIC_URL: https://saleor-demo.s3.amazonaws.com/assets/ | ||
- run: | ||
name: Run tests | ||
command: | | ||
docker run -d --name db circleci/postgres:latest | ||
docker run --network container:db --rm -e DATABASE_URL -e DJANGO_SETTINGS_MODULE -e SECRET_KEY mirumee/saleor:latest /app/virtualenv/bin/pytest | ||
environment: | ||
DATABASE_URL: postgres://root:@localhost:5432/circle_test | ||
DJANGO_SETTINGS_MODULE: saleor.settings | ||
SECRET_KEY: irrelevant | ||
- deploy: | ||
name: Push Docker image | ||
command: | | ||
if [ "${CIRCLE_TAG}" == demo* ]; then | ||
docker login -e $DOCKERCLOUD_EMAIL -u $DOCKERCLOUD_USER -p $DOCKERCLOUD_PASS | ||
docker tag mirumee/saleor:latest mirumee/saleor:$CIRCLE_SHA1 | ||
docker push mirumee/saleor:$CIRCLE_SHA1 | ||
docker push mirumee/saleor:latest | ||
curl -X POST https://circleci.com/api/v1.1/project/github/mirumee/saleor-demo?circle-token=$CIRCLE_API_TOKEN | ||
fi |
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,4 +1,6 @@ | ||
.* | ||
**/*.pyc | ||
*.sqlite | ||
media | ||
node_modules | ||
static |
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,6 +1,7 @@ | ||
*.py[cod] | ||
.* | ||
!.babelrc | ||
!.circleci | ||
!.codeclimate.yml | ||
!.coveragerc | ||
!.dockerignore | ||
|
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 was deleted.
Oops, something went wrong.