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

Use different way to get old instance id

Since we don't delete old instance,
using instance name will result in getting multiple ids
parent ac40bcbf
No related branches found
No related tags found
1 merge request!10Add gitlab ci into project
......@@ -70,7 +70,12 @@ test:
tags:
- build
script:
- export OLD_INSTANCE_ID=$(openstack server list --name ood-knightly -c ID -f value)
- OLD_INSTANCE_IP=$(openstack floating ip list --floating-ip-address $CHEAHA_IP -c "Fixed IP Address" -f value)
- echo $OLD_INSTANCE_IP
- |
if [ ! -z $OLD_INSTANCE_IP ]; then
export OLD_INSTANCE_ID=$(openstack server list --name ood-knightly --ip $OLD_INSTANCE_IP -c ID -f value)
fi
- echo OLD_INSTANCE_ID=$OLD_INSTANCE_ID | tee -a instance.env
- |
cat > user_data.txt << OEOF
......
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