feat: add new local_archive update code strategy#4017
feat: add new local_archive update code strategy#4017antonmedv merged 2 commits intodeployphp:masterfrom
local_archive update code strategy#4017Conversation
26bd0c9 to
551e516
Compare
551e516 to
ed77fde
Compare
|
Hi, Currently, I have to use this temporary solution : tasks:
deploy:update_code_from_runner:
- select: 'from=runner'
- upload:
src: '.'
dest: '{{release_path}}'
- run: 'echo $(git rev-parse HEAD) > {{release_path}}/REVISION'
# Déploiement classique si on n'est pas dans le contexte d'un runner
deploy:update_code_from_git:
- select: 'from!=runner'
- run: 'deploy:update_code'
deploy:prepare:
- 'deploy:info'
- 'deploy:setup'
- 'deploy:lock'
- 'deploy:release'
- 'deploy:update_code_from_runner'
- 'deploy:update_code_from_git'
- 'deploy:shared'
- 'deploy:writable'hosts:
production:
<<: *production
local: true
labels: { from: runner } |
|
It's a problem for you @calebdw if I change that : I run |
Why the need to run deployer from a subdirectory? Seems like it's just easier to switch to the root dir and run there. Anyways, it doesn't really matter to me, it's up to the maintainer (@antonmedv) if he wants to support using this command outside the repo root |
|
All the files about deployment (deployer.phar, recipes, host) are stored in a deploy folder in my repository. So before starting deployer, I move to the |
Supersedes #3906
Hello!
Description
This adds a new
local_archiveupdate code strategy which creates a tar from the local repository that is then streamed to the remote server and unpacked. This removes the need for the remote server to fetch the changes from the remote repository.Motivation
We have a privately hosted Gitlab instance, and we deploy to cloud servers via our ci/cd pipelines. This has been working just fine in the past. However, we've recently encountered an issue where the external server is not able to connect via ssh to the internal Gitlab server---which means the
git remote updatefails and our deployments are failing. The root issue is non-trivial and our IT personnel has been working with Cisco techs for a couple of weeks now, but they still have not been able to fix the issue.I temporarily fixed our deployments by overriding the
deploy:update_codetask to simply use the local repository in the pipeline which works perfectly:I figured it would be a good idea to contribute this upstream in case anyone else would like to use this strategy :)
Thanks!