Skip to content
Snippets Groups Projects
Commit cf8f8dc2 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Add review app job

parent dcbde614
No related branches found
No related tags found
No related merge requests found
......@@ -150,14 +150,39 @@ test:
- |
if [ $CI_PIPELINE_SOURCE = "schedule" ]; then
openstack server remove floating ip $NEW_INSTANCE_ID $FLOATING_IP
else
openstack server delete $NEW_INSTANCE_ID
openstack image delete $BUILT_OOD_IMAGE_ID
fi
artifacts:
reports:
dotenv: instance.env
deploy_review:
image: $CI_REGISTRY_IMAGE:latest
stage: deploy
script:
- echo "Deploy Review App"
environment:
name: review/$CI_COMMIT_REF_SLUG
url: https://$CI_COMMIT_REF_SLUG.$FLOATING_IP.nip.io
on_stop: stop_review
tags:
- build
rules:
- if: $CI_MERGE_REQUEST_ID
stop_review:
image: $CI_REGISTRY_IMAGE:latest
stage: deploy
script:
- openstack server delete $NEW_INSTANCE_ID
- openstack image delete $BUILT_OOD_IMAGE_ID
- openstack floating ip delete $FLOATING_IP
environment:
name: review/$CI_COMMIT_REF_SLUG
action: stop
rules:
- if: $CI_MERGE_REQUEST_ID
when: manual
deploy_knightly:
image: $CI_REGISTRY_IMAGE:latest
stage: deploy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment