[Gitlab CI] When stop a review app local project files are not available
Summary
When starting a job with stop review app not available project files. This point unlogical and create problem + docs https://docs.gitlab.com/ee/ci/environments/index.html#example-of-setting-dynamic-environment-urls broken, because don't use GIT_STRATEGY: none
and use local project file ./teardown-environment
but is not allowed
Steps to reproduce
I have dynamical stands
Deploy dynamical:
stage: deploy
image: my-awesome-cli-tools
only:
- branches
except:
- tags
- master
artifacts:
reports:
dotenv: deploy.env
environment:
name: "review/${CI_COMMIT_REF_SLUG}"
url: $DYNAMIC_ENVIRONMENT_URL
on_stop: Delete dynamical
script:
- unic deploy --stand dynamic
Delete dynamical:
stage: finalize
allow_failure: true
retry: 2
image: my-awesome-cli-tools
only:
- branches
except:
- tags
- master
when: manual
dependencies: []
variables:
GIT_STRATEGY: none
environment:
name: review/${CI_COMMIT_REF_SLUG}
action: stop
script:
- unic remove --stand dynamic
But when run job Delete dynamical
after close MR job start without project files. In my case, I need a configuration file in the projects folder
What is the current bug behavior?
Delete dynamical:
stage: finalize
only:
- branches
when: manual
dependencies: []
variables:
GIT_STRATEGY: none
environment:
name: review/${CI_COMMIT_REF_SLUG}
action: stop
script:
- cat README.md
Result
cat: README.md: No such file or directory
What is the expected correct behavior?
Delete dynamical:
stage: finalize
only:
- branches
when: manual
dependencies: []
variables:
GIT_STRATEGY: none
environment:
name: review/${CI_COMMIT_REF_SLUG}
action: stop
script:
- cat README.md
Result
## Readme