Incorrect Environment State is Rendered When Environment Variable Is Empty
https://gitlab.zendesk.com/agent/tickets/116970 (internal) ## Summary When the environment variable is empty ## Steps to reproduce 1) Create new environment 2) Use an empty variable. In the example below, the URL below will be empty because nested variables are not supported ``` stages: - deploy variables: APP: "My App" DEPLOY_NAME: $APP-master deploy: stage: deploy script: - echo $DEPLOY_NAME - echo "here would be the script to deploy the app" environment: name: $CI_COMMIT_REF_NAME url: $DEPLOY_NAME on_stop: stopDeploy tags: - "update_tags" stopDeploy: stage: deploy variables: GIT_STRATEGY: none script: - echo "here would be the script to stop the app" when: manual environment: name: $CI_COMMIT_REF_NAME action: stop tags: - "update_tags" ``` 3) Stop the environments via UI * Head to Operations -> Environments. Click Stop 4) Click the latest ID 5) Observe that the state shows "Stopped" 6) Click re-deploy 7) Observe state showing Stopped, though the new state should be "Available" ## Actual behavior The wrong environment state is rendered ## Expected behavior When clicking `re-deploy`, it should show `Available #{counter}` and not `Stopped #{counter}` > What you should see instead `Stopped` instead of `Available` ## Relevant logs and/or screenshots ![stopped-env.](/uploads/d74031d514dbfef09c6ed4695fb8e636/stopped-env..png) ![env-stopped-showing-stop-button](/uploads/7e6947dd9b510d2bb3a2e4dc77ab8ca0/env-stopped-showing-stop-button.png) ### Used GitLab Runner version 11.9
issue