-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update By Tag #47
Comments
Would this upgrade by Docker tag? ie, anything with ":latest" would be |
Not quite what I had it mind, but that’s possible to. I’m actually referring to rancher tags. For example, I could create a couple WordPress stacks and tag them WordPress in rancher. What I’d like to happen is if I then run —service pho —tag WordPress, it would proceed to upgrade each php service in every stack tagged WordPress
…Sent from my iPhone
On Mar 16, 2018, at 1:34 PM, Chris R ***@***.***> wrote:
Would this upgrade by Docker tag? ie, anything with ":latest" would be upgrade --tag latest?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Some additional clarification. Due to the nature of this, I think that using --tag would need to completely ignore --stack. If you were to specify tag and multiple stacks exist with the same tag, then the assumption is that you are trying to update each stack tagged as such, not just one. It is also reasonable to say that using --tag would require a need for a --exclude-stack option as well, so we could say update all stacks tagged wordpress but the stack named 'my-legacy-stack'. Going back to the WordPress example, If I use a custom build image of WordPress and I have multiple clients running that same build but are otherwise isolated from each other, currently I'd have to put an upgrade line to the .gitlab-ci.yml for each stack in the environment. IE: deploy:
image: cdrx/rancher-gitlab-deploy
environment: production
dependencies: []
script:
- upgrade --stack Client 2 --service wordpress
- upgrade --stack Client 3 --service wordpress
- upgrade --stack Client 4 --service wordpress
- upgrade --stack Client 5 --service wordpress
- upgrade --stack Client 6 --service wordpress
- upgrade --stack Client 7 --service wordpress
...
- upgrade --stack Client N --service wordpress I would also have to update the yaml any time I add a new stack. If this functionality could be accomplished, then the pipeline only needs to use the upgrade tag line once, with the tag, and updates every stack. IE: deploy:
image: cdrx/rancher-gitlab-deploy
environment: production
dependencies: []
script:
- upgrade --tag wordpress --exclude-stack old-client-stack --service wordpress |
I have another example for this feature. I have two environments, It would be easy to setup in Rancher and in GitLab. deploy-preview:
stage: deploy
image: cdrx/rancher-gitlab-deploy
script:
- upgrade --tag $CI_PROJECT_ID_preview
only:
- develop
environment:
name: preview
deploy-production:
stage: deploy
image: cdrx/rancher-gitlab-deploy
script:
- upgrade --tag $CI_PROJECT_ID_production
only:
- master
environment:
name: production
Regards |
Not sure if this is possible or not, but it would be nice if this was able to update by tag. Instead of saying
I could instead just say
The text was updated successfully, but these errors were encountered: