Skip to content

feat: publish to two different remote VCS #149

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

Open
Sieboldianus opened this issue Sep 17, 2019 · 15 comments
Open

feat: publish to two different remote VCS #149

Sieboldianus opened this issue Sep 17, 2019 · 15 comments
Labels
confirmed Prevent from becoming stale feature A new feature or a feature request

Comments

@Sieboldianus
Copy link
Contributor

Sieboldianus commented Sep 17, 2019

My situation may appear a little bit untypically, but perhaps this is already implemented:

  • we have a closed Gitlab instance that we use for internal software development
  • we publish some of our branches/tools to Github, for external code collaboration

So far, I've only released releases in Github, because it was not possible in python-semantic-release to setup custom Gitlab instances.

Since GL_TOKEN became available, I'd also like to publish releases to the master branch on our custom Gitlab instance.

However, python-semantic-release seems to only use the remote that is set as default git remote. Is there any way to have it simultaneously publish releases to both Github and Gitlab using GH_TOKEN (e.g. remote origin) and GL_TOKEN (e.g. remote gl_origin)?

Alternatively, manually publishing/updating all releases to Gitlab would be totally ok for me, if there was such an option..

@relekang
Copy link
Member

So is this about having a cli option to the changelog command to be able to push the changelog to gitlab as well?

@Sieboldianus
Copy link
Contributor Author

Sieboldianus commented Sep 20, 2019

Yes, either this, or a cli option to select the remote by name (and if it is a gitlab-remote, it will update/release the changelog using the GL_TOKEN; if it is a github-remote, it will update/release the changelog using the GH_TOKEN).

Does this make sense?

To add some information: we usually have two remotes, one for internal collaboration where we push additional branches etc., and a github-remote, where only the master branch is published. E.g.:

git remote -v
origin  git@github.com:user/package-xyz.git (fetch)
origin  git@github.com:user/package-xyz.git (push)
origin-internal      git@gitlab.example.com:user/package-xyz.git (fetch)
origin-internal      git@gitlab.example.com:user/package-xyz.git (push)

I'd like to publish the changelog/releases to both origin and origin-internal, currently, it is only posted to the default remote (origin) when using semantic-release publish.

@relekang
Copy link
Member

That sounds like a good idea.

@relekang relekang added feature A new feature or a feature request help-wanted Extra attention is required labels Sep 20, 2019
@alandtse
Copy link
Contributor

To add to this, I'd like the ability to identify a second branch to push to. I use a dual branch (dev/master) release system and that sounds like it could just built in to this feature request. There's added complexity allowing for multiple remotes over multiple branches but it seems like a natural extension.

Let me know if you think multiple branch pushes should just be it's own request.

@github-actions github-actions bot removed the help-wanted Extra attention is required label May 27, 2020
@github-actions github-actions bot added the help-wanted Extra attention is required label Jun 18, 2020
@github-actions github-actions bot removed the help-wanted Extra attention is required label Oct 24, 2022
@github-actions github-actions bot added the stale label Mar 27, 2024
@codejedi365 codejedi365 added confirmed Prevent from becoming stale and removed stale labels Mar 31, 2024
@codejedi365 codejedi365 added the help-wanted Extra attention is required label Mar 31, 2024
Copy link

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label May 31, 2024
@codejedi365
Copy link
Contributor

No update yet, still in the back log

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Jun 1, 2024
Copy link

github-actions bot commented Aug 1, 2024

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label Aug 1, 2024
@codejedi365
Copy link
Contributor

No change, still in backlog

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Aug 2, 2024
Copy link

github-actions bot commented Oct 1, 2024

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label Oct 1, 2024
@codejedi365
Copy link
Contributor

codejedi365 commented Oct 2, 2024

My new thought on this is that you can gain what you are looking for with two release configurations. One for GitLab and one for GitHub and then use the -c option to select the one you desire for that run. If you have one in the pyproject.toml file this will be selected by default in the one job and then your other one could be github-releaserc.toml. Unfortunately you will have to keep all the other settings in sync manually since we don't have a cli switch to toggle which repository but this would get you some level of capability.

I'm not sure if we will ever add the cli option to set the remote url directly but might make it handle multiple remotes configurations instead (with some toggle mechanism in between).

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Oct 3, 2024
@codejedi365 codejedi365 changed the title Any way to set remote repository in cli mode? feat: publish to two different remote publishing Oct 3, 2024
@codejedi365 codejedi365 changed the title feat: publish to two different remote publishing feat: publish to two different remote VCS Oct 3, 2024
@codejedi365 codejedi365 removed the help-wanted Extra attention is required label Dec 2, 2024
Copy link

github-actions bot commented Feb 1, 2025

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label Feb 1, 2025
@thedannymarsh
Copy link

One way to accomplish this would also be to add a --remote-type command line option, then you could pass "gitlab" or "github", overriding the configuration file's remote.type.

@codejedi365
Copy link
Contributor

codejedi365 commented Mar 20, 2025

I would prefer a #1099 implementation so that I'm not maintaining adding a new cli option for every variance that comes up over the future of the project. We already have a lot.

Have we considered what other options have to change once the new remote type changes? Is the remote URL gathered from the environment? Is the access token have the same name etc?

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Mar 20, 2025
Copy link

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label May 19, 2025
@codejedi365
Copy link
Contributor

Still in backlog

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Prevent from becoming stale feature A new feature or a feature request
Projects
None yet
Development

No branches or pull requests

5 participants