Created
February 10, 2019 22:02
-
-
Save hodrigohamalho/8941880056980e79743b84c864c84e97 to your computer and use it in GitHub Desktop.
setup-pipeline
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
| # setup dev env | |
| oc import-image wildfly --from=openshift/wildfly-120-centos7 --confirm -n ${DEV_PROJECT} | |
| # dev | |
| oc new-build --name=tasks --image-stream=wildfly:latest --binary=true -n ${DEV_PROJECT} | |
| oc new-app tasks:latest --allow-missing-images -n ${DEV_PROJECT} | |
| oc set triggers dc -l app=tasks --containers=tasks --from-image=tasks:latest --manual -n ${DEV_PROJECT} | |
| # stage | |
| oc new-app tasks:stage --allow-missing-images -n ${STAGE_PROJECT} | |
| oc set triggers dc -l app=tasks --containers=tasks --from-image=tasks:stage --manual -n ${STAGE_PROJECT} | |
| # dev project | |
| oc expose dc/tasks --port=8080 -n ${DEV_PROJECT} | |
| oc expose svc/tasks -n ${DEV_PROJECT} | |
| oc set probe dc/tasks --readiness --get-url=http://:8080/ws/demo/healthcheck --initial-delay-seconds=30 --failure-threshold=10 --period-seconds=10 -n ${DEV_PROJECT} | |
| oc set probe dc/tasks --liveness --get-url=http://:8080/ws/demo/healthcheck --initial-delay-seconds=180 --failure-threshold=10 --period-seconds=10 -n ${DEV_PROJECT} | |
| oc rollout cancel dc/tasks -n ${STAGE_PROJECT} | |
| # stage project | |
| oc expose dc/tasks --port=8080 -n ${STAGE_PROJECT} | |
| oc expose svc/tasks -n ${STAGE_PROJECT} | |
| oc set probe dc/tasks --readiness --get-url=http://:8080/ws/demo/healthcheck --initial-delay-seconds=30 --failure-threshold=10 --period-seconds=10 -n ${STAGE_PROJECT} | |
| oc set probe dc/tasks --liveness --get-url=http://:8080/ws/demo/healthcheck --initial-delay-seconds=180 --failure-threshold=10 --period-seconds=10 -n ${STAGE_PROJECT} | |
| oc rollout cancel dc/tasks -n ${DEV_PROJECT} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment