-
Notifications
You must be signed in to change notification settings - Fork 13
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
Allow builds on pushing a tag #153
Comments
Any word on when this will be implemented? |
I am also looking for this feature. |
[nucleardreamer] This has attached https://jel.ly.fish/7d122467-bbf2-4599-bf5a-0cb42a895c86 |
@Maggie0002 @brennanwilkes @wes8ty could you share more information about your release/deploy workflows? This will enable us to better design a general feature for the more general use case. Thank you! |
This sounds like the commit-to-master workflow described in the readme but triggers on tags. I am a little concerned if we are just going to make the action start to support a lot of workflows. Most of the work on this action was around leveraging draft releases so you can test on a device before merging/finalizing. There is a PR which will support this workflow but I want to check if we want to continue down this path of adding more workflows. Right now, building a release on tag event seems more useful than push to master so I'd argue for it to be the last new workflow to be added. |
Hi, Kind regards, |
Hello, So the current challenge I have with the example is that it publishes/creates a new container for every pull request. If you have 10+ people working on a project doing each of their pull requests... this is a lot of container versions... Second, a feature sometimes takes multiple pull requests to implement (at least for us) which means things are expected to break until all the pull requests are complete for that epic. You can't really test the pull request because it takes multiple people in parallel to make it come together. We want to do a release often enough to test using our CI / CD but not on each pull request to where we don't give the developers enough time to actually implement the pull request (unit tests + integration tests + feature + docs...ect). When we create a release (with tag) this means:
If we need to test something locally first, we will use the live push feature of Balena as a first-level validation that the code committed within the pull requests works with the hardware. Sometimes this becomes difficult because not everyone has the hardware to test so the only option is the Hopefully, this helps with the use case at least for us. |
@wes8ty has listed some great points. I can add a few other scenarios:
|
@Maggie0002 @wes8ty I would love to get some feedback on my PR on this. As far as I can tell it should satisfy your needs, since I literally based it in the workflow provided at the start top of this issue. |
@thgreasi @20k-ultra I haven't tested it, but assuming it runs without being a breaking change (i.e. no changes required to the .yml file) then I think it would serve all the various scenarios (as you say, based on the fact it was built around the initial post then safe to say it would serve my scenarios). I can see how adding another criteria could broaden the scope and there is concern about opening a can of worms, especially as the pull request just adds one additional type: - if (context.eventName === 'push' && context.ref === `refs/heads/${target}`) {
+ if (
+ context.eventName === 'push' &&
+ (context.ref === `refs/heads/${target}` ||
+ context.ref.startsWith('refs/tags/'))
+ ) That said, I think the change could be seen as finishing off the existing on -> push -> branches feature, rather than be seen as a new feature. Looking at the GitHub docs, the current push on branch that is already included in the action and action docs is grouped with push on tag feature, and this change would complete that grouping of functionality: Considering there appears to be demand for tags, that GitHub groups those two features (branch and tag), and that pushing on tags is something we see a lot in other repos I'm thinking it's solid to include the change without having to worry about having to support other features in the future just yet? |
Edit: To really be sure that the grouping of functionality is included, it should probably be tested with glob patterns and excludes ( |
So I was able to test the
I do have the |
Can you clarify which version you expected to see and where @wes8ty ? type: sw.application
version: '1.2.3' You can update that though using the actions in the UI (or w/ a PATCH the Update: just saw that you mentioned that you already have a balena.yml... |
Trimmed version. I have tried
I do not see any errors in the workflow log. |
Where is the
I was able to fix the version also today (weekend break really helps). I was ignoring yaml files in the docker ignore file so that is why it was not working. |
Hi @wes8ty, If your use case is to only finalize the release from the dashboard at a later point, then you could probably workaround that limitation by having your fleet track (be pinned to) a specific release, and change it to track the newer release once you are comfortable with it: |
Hey everyone. I appreciate the discussion and wish we could implement this feature but I don't think we will. This github action was built to work around leveraging draft releases (new release modelling change that we will get more documentation for). If we start adding workflows that do not support creating draft releases we will be straying further away from the goal of this action. Most if not all the time building this action was figuring out the complexities of making a release that can be referenced again later on another Github action. I feel that we (Balena) made a mistake by allowing this action to work by pushing to master since that workflow does not use draft releases. I think that workflow should be removed to avoid confusion honestly. I understand how people could see a master workflow is not that much different from tag commit event so that should be supported too, therefore it (master workflow) should be removed. I have been talking with some people though about how we can support other workflows that use draft releases. For example, on merge to master, a draft release is built and when a commit is tagged or release is made than that draft version is marked as final. That achieves the goal of this issue while leveraging draft releases. The benefit of draft releases is that what you tested is what runs on your fleet. If you merge some code into master then build a release which your fleets pull, the build might have differences from resources it pulls at build time (what if there's an exploit and the package your Dockfile step downloads is not the same as what you ran in your development). For those that just want to build a release without dealing with draft releases than I suggest checking out the community actions in the marketplace which just wrap the balena cli and you can simply run push with those. |
hey all again. If you give #181 a read I think we can make this action achieve what everyone wants. |
@20k-ultra @klutchell, thanks for taking a look at this. I will give some thought to #181, I think you are right there is some room to make it more 'composable'. In the meantime, I have taken on board what you said about this repo having an action with a very specific purpose, and that the community actions may be better suited. I think you are right, this repo had a very specific purpose, and there may be value in going back to something very simple and building up from there. So I have had a swing at an action that does what I think I need it to do. It simply wraps the CLI and opens all the functions to the user, without being too prescriptive. Because it only wraps the CLI it also opens up other options like preloading, which is something I had also been meaning to work on. Hopefully I can entice some other community members in to contribute, I have looked around and there are lots of us in the community doing the same thing. I will try and pull everyone together on the forums and see if we can't pull our resources. Going forward, I would like to see how people use it. I will give it some time and then poke around how different users are implementing it, and based on common use cases may look to build some of those features in. As always, ideas, thoughts, experiments welcome. |
Triggering a new push to the Balena cloud each time a pull request is merged is a little too eager for my liking. I would rather have greater control over when a new release is generated, so I can merge many pull requests together in to the repo before deploying a release. I usually do this by building workflows to run when a tag is pushed:
In this workflow though, I get the following error:
The text was updated successfully, but these errors were encountered: