Created
July 25, 2017 10:35
-
-
Save laszlocph/0cac604fa56e0ac6e5a2141939162fb4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
image: laszlocloud/build-image | |
before_script: | |
stages: | |
- test | |
- build | |
- deploy | |
test: | |
stage: test | |
script: | |
- echo "Running tests" | |
- ./gradlew test | |
build: | |
stage: build | |
script: | |
- echo "Building the app" | |
- ./gradlew clean build | |
- docker login -u $DOCKER_USER -p $DOCKER_PASS | |
- docker pull laszlocloud/todomvc-springboot-backend | |
- docker build --rm=false -t laszlocloud/todomvc-springboot-backend:${CI_COMMIT_REF_NAME} . | |
- docker push laszlocloud/todomvc-springboot-backend:${CI_COMMIT_REF_NAME} | |
deploy_review: | |
stage: deploy | |
script: | |
- echo "Deploy to staging server" | |
- cat stack.json | sed "s/<<ENV>>/${CI_COMMIT_REF_NAME}/g" | curl -v -XPOST --data "@-" --header "Content-Type:application/json" http://laszlo.cloud:8080/v2-beta/projects/1a5/stacks | |
environment: | |
name: review/$CI_COMMIT_REF_NAME | |
url: http://$CI_COMMIT_REF_NAME.laszlo.cloud |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment