In my project, the deployment script uses the results of the build job, but I see that in my deployment job, GitLab CI repeats all the changes from the last commit, and also deletes all the files created by the build job. I am using Shell Executor.
Is there a way to prevent GitLab CI from being used in the deployment task so that my deployment can simply continue from where my build task stopped?
I tried:
cache:
untracked: true
in my deployment task, but it didn't seem to make any difference.
my full .gitlab-ci.yml:
before_script:
- sudo apt-get -y install default-jdk
- sudo add-apt-repository -y ppa:cwchien/gradle
- sudo apt-get -y update
- sudo apt-get -y install gradle
- curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
- sudo apt-get install -y nodejs
- sudo npm install -g pm2
stages:
- build
- test
- deploy
after_script:
jobBuild:
stage: build
script:
- ( cd my-lib; gradle build assemble)
only:
- master
jobDeploy:
before_script:
stage: deploy
cache:
untracked: true
script:
- <some shell scripts>
only:
- master
source
share