Can't build from a different branch than master #440

Open
didrocks opened this Issue Mar 9, 2017 · 18 comments

Comments

Projects
None yet
10 participants

didrocks commented Mar 9, 2017

I'm sure you know about that one, it's more for a tracking purpose.

You can't build to a different branch than master, which could be handy in that you have maintainance and release branch. Seems like a good opportunity for build.snapcraft.io

Collaborator

evandandrea commented Mar 9, 2017

didrocks commented Mar 9, 2017

Hey Evan! Yes:

  • I have a master branch (pointing to 2.0 features) which goes to edge (in implicit "latest" track).
  • I have a 1.x branch which gets regular bug fixes. I want it to publish in another track (once we have track support), like 1.x/edge

That way I always have latest release on all my maintenance branch

Another interesting note, would be to produce some snaps based on features:
master -> edge ("latest" track)
feature-foo -> features/edge/foo
That way, people can test feature foo just in installing the snap in features/edge/foo (or if we don't have the 3 branch parts: foo/edge, having a "foo" track).
Continous delivery, and continous testing of features! Sounds almost like CI-Airline which rings a bell to you, I'm sure :)

Collaborator

evandandrea commented Mar 13, 2017

Thanks for clarifying. So we can call this tracks / major version branches support, as you suggest.

It will require design work. In terms of priority, I think we should implement organisations support (#132) before we come to this.

👍 in term of priority for org support.

Collaborator

evandandrea commented Mar 14, 2017

"ondra: and one more thing, so looking to various github projects, they seem to tag releases,but not really push it to any branch, which is quite tricky to make build"

So perhaps we need to support a mapping of branch or tag to track.

@ghost ghost added the Status: Proposal label Apr 24, 2017

@ghost ghost removed the Status: Proposal label Apr 25, 2017

At least it shouldn't be pointing directly to master but use the default branch set in Github.

In the other hand, it would be great if the branch/tag setting is something like automation build in docker hub.

selection_301

Collaborator

evandandrea commented Jun 2, 2017

This is happening for tarantool as well.

+1
MuseScore has the same need.

👍 required for Liri Platform too.

Collaborator

evandandrea commented Jul 14, 2017

Tracking a few more cases where this is needed:

You can Minio under the mix here as well @evandandrea

Collaborator

evandandrea commented Aug 14, 2017

@harshavardhana is 'release' the branch you want to build snaps from?

Actually no just the tags is fine. I think this issue is not the same sorry for the confusion.

tim-sueberkrueb commented Oct 7, 2017

Hey, any news on this one? It's the only real show stopper for me (and probably for the other mentioned cases too). Just using the default GitHub branch for a start won't be a very difficult change (I guess) but it would improve the story a lot for many users :)
EDIT: Just learned this was supposed to be the case already! Looks like it hasn't taken effect automatically for my existing repo. Just readded the repo and hope it will work now.

Interesting, it still doesn't work: https://build.snapcraft.io/user/lirios/platform-snap/89110 Any ideas? Am I doing something wrong? It is still trying to build from master. The default branch is clearly develop. Thanks in advance!

Collaborator

cjwatson commented Oct 7, 2017

@tim-sueberkrueb, something odd is going on here, but I don't think it's on our side. Observe:

$ git clone https://github.com/lirios/platform-snap
$ git -C platform-snap branch
* master
$ git clone https://github.com/cjwatson/jenkins-snap
$ git -C jenkins-snap branch
* drop-use-proxy
$ git clone https://github.com/ethereum/cpp-ethereum
$ git -C cpp-ethereum branch
* develop

Why is your repository different? It appears that it has develop somehow set as the default branch in the web UI, but it isn't what you get as HEAD when you clone the repository. This is the root of the issue: fix it and things will work.

@cjwatson wow, this is indeed very odd! Normally setting GitHub default branch should also change the remote HEAD, because this is a setting you can only make having direct access to the remote git repo 0.0 (afaik) Anyway, I deleted master (and changed the default branch setting again) and will recreate it in the future, I hope it will work now. Thanks a lot, I didn't notice!

Contributor

elopio commented Nov 15, 2017

parity has three branches: master, stable and beta. It would be great to be able to build the three. Even better if we could automatically land the snaps into the respective channels in the store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment