Merge pull request #231 from fpco/deploy-cron

Deploy cron
This commit is contained in:
Michael Snoyman 2017-07-14 16:27:59 +03:00 committed by GitHub
commit 3a1da33a71
3 changed files with 8 additions and 2 deletions

2
.gitignore vendored
View File

@ -18,3 +18,5 @@ TAGS
/docker/app/
.stack-work
/stackage-database/
*~
*#

View File

@ -85,6 +85,7 @@ deploy_prod:
url: https://www.stackage.org/
variables:
DEPLOYMENT_NAME: "stackage-server-prod"
CRON_DEPLOYMENT_NAME: "stackage-server-cron-prod"
PROD_DEPLOYMENT_IMAGE: "fpco/stackage-server-prod:${CI_BUILD_REF_SLUG}_${CI_PIPELINE_ID}"
script:
- export
@ -99,4 +100,6 @@ deploy_prod:
- docker tag "$DEPLOYMENT_IMAGE" "fpco/stackage-server-prod:latest"
- docker push "fpco/stackage-server-prod:latest"
- kubectl set image "deployment/$DEPLOYMENT_NAME" stackage-server="$PROD_DEPLOYMENT_IMAGE"
- kubectl set image "deployment/CRON_$DEPLOYMENT_NAME" stackage-server=-cron"$PROD_DEPLOYMENT_IMAGE"
- kubectl rollout status "deployment/$DEPLOYMENT_NAME"
- kubectl rollout status "deployment/$CRON_DEPLOYMENT_NAME"

View File

@ -32,9 +32,10 @@ before_install:
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
install:
# Build dependencies. Start with just haskell-src-exts since it requires a lot
# of memory and we want it to build by itself.
# Build dependencies. Start with just haskell-src-exts and then store since
# they require a lot of memory and we want it to build by itself.
- stack --no-terminal --install-ghc build haskell-src-exts
- stack --no-terminal --install-ghc build store
- stack --no-terminal --install-ghc test --only-dependencies
script: