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

Fix syntax error

parent b3a983af
No related branches found
No related tags found
1 merge request!76Add debug flag
Pipeline #9871 passed
......@@ -85,7 +85,8 @@ build_docker_image:
- *get_build_date
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set -x
fi
- docker build -t $CI_REGISTRY_IMAGE:$BUILD_DATE -t $CI_REGISTRY_IMAGE:latest .
......@@ -97,7 +98,8 @@ build_docker_image:
s3cmd --version &&
terraform --version'
- docker push --all-tags $CI_REGISTRY_IMAGE
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set +x
fi
rules:
......@@ -111,7 +113,8 @@ build_base_image:
tags:
- build
script:
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set -x
fi
- |
......@@ -136,7 +139,8 @@ build_base_image:
- export BUILT_BASE_IMAGE_ID=$(grep 'Image:' base_build.log | awk '{print $4}')
- echo BUILT_BASE_IMAGE_ID=${BUILT_BASE_IMAGE_ID} | tee -a $CI_PROJECT_DIR/image.env
- openstack image unset --property signature_verified $BUILT_BASE_IMAGE_ID
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set +x
fi
artifacts:
......@@ -150,7 +154,8 @@ build_compute_image:
tags:
- build
script:
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set -x
fi
- *update_ansible_repo
......@@ -169,7 +174,8 @@ build_compute_image:
- packer init openstack-compute
- packer validate openstack-compute
- packer build -machine-readable openstack-compute | tee compute_build.log
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set +x
fi
......@@ -179,7 +185,8 @@ build_gpu_image:
tags:
- build
script:
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set -x
fi
- *update_ansible_repo
......@@ -208,7 +215,8 @@ build_gpu_image:
if [ "$FAILED" = true ]; then
exit 1
fi
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set +x
fi
rules:
......@@ -223,7 +231,8 @@ build_ood_image:
tags:
- build
script:
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set -x
fi
- *update_ansible_repo
......@@ -261,7 +270,8 @@ build_ood_image:
- export BUILT_OOD_IMAGE_ID=$(grep 'Image:' ood_build.log | awk '{print $4}')
- echo BUILT_OOD_IMAGE_ID=${BUILT_OOD_IMAGE_ID} | tee -a $CI_PROJECT_DIR/image.env
- openstack image set --property CRI_XCBC_prod=${CRI_XCBC_prod} --property CRI_XCBC_dev=${CRI_XCBC_dev} --property PACKER_IMAGE_HEAD=${PACKER_IMAGE_HEAD} ${BUILT_OOD_IMAGE_ID}
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set +x
fi
artifacts:
......@@ -276,7 +286,8 @@ test_ood_image:
tags:
- build
script:
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set -x
fi
- FAILED=false
......@@ -345,7 +356,8 @@ test_ood_image:
if [ $CI_PIPELINE_SOURCE = "schedule" ]; then
openstack server remove floating ip $NEW_INSTANCE_ID $FLOATING_IP
fi
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set +x
fi
artifacts:
......@@ -369,13 +381,15 @@ deploy_review:
stop_review:
stage: deploy
script:
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set -x
fi
- openstack server delete $NEW_INSTANCE_ID
- openstack image delete $BUILT_OOD_IMAGE_ID
- openstack floating ip delete $FLOATING_IP
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set +x
fi
environment:
......@@ -394,7 +408,8 @@ deploy_knightly:
tags:
- build
script:
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set -x
fi
- |
......@@ -416,7 +431,8 @@ deploy_knightly:
for img in ${IMAGE_TO_BE_DELETE[@]}; do
openstack image delete ${img}
done
- if [ "$DEBUG" = true ]; then
- |
if [ "$DEBUG" = true ]; then
set +x
fi
only:
......
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