• 0
    • 3
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      I would like to have the build script behave differently if the build was scheduled vs triggered by a checkin vs triggered by another build. The most pressing need for me is to run more tests on the scheduled build.

            [BAM-13030] provide trigger reason in a bamboo property

            Hello,

            As a part of the 9.3 release, there will be a variable added (`bamboo.triggerReason.key`) that will be present in both the plan and deployment contexts (so it will be also accessible as a Task condition).

            This variable will point out the key of the trigger reason e.g. `com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason`. 

             

            Bamboo Development Team

            Mateusz Szmal added a comment - Hello, As a part of the 9.3 release, there will be a variable added (`bamboo.triggerReason.key`) that will be present in both the plan and deployment contexts (so it will be also accessible as a Task condition). This variable will point out the key of the trigger reason e.g. `com.atlassian.bamboo.plugin.system.triggerReason:ManualBuildTriggerReason`.    Bamboo Development Team

            Our use case is the same as other comments, with the  plan behaving differently depending on the trigger reason for a build.
            ie If the build was bitbucker server commit or a scheduled build triggered

            The plan variable bamboo.ManualBuildTriggerReason.userName  already exists. 

            If a trigger type variable was made available, scripts could then be written to handle the various trigger types scenarios
            eg

            bamboo.BuildTrigger.type= Scheduled
            bamboo.BuildTrigger.type=BitbuckerServerRepository
            etc

            Brendan Doherty added a comment - Our use case is the same as other comments, with the  plan behaving differently depending on the trigger reason for a build. ie If the build was bitbucker server commit or a scheduled build triggered The plan variable bamboo.ManualBuildTriggerReason.userName  already exists.  If a trigger type variable was made available, scripts could then be written to handle the various trigger types scenarios eg bamboo.BuildTrigger.type= Scheduled bamboo.BuildTrigger.type=BitbuckerServerRepository etc

            xr600 added a comment -

            Differentiating builds was exactly why I developed this: However, I am not using Bamboo at the moment - And not actively maintaining this project either (I did the plugin on my own time, when I worked in consultancy... ). 

             

            The code, however, is really not that complex, so should be easy to customize for any needs  

            xr600 added a comment - Differentiating builds was exactly why I developed this: However, I am not using Bamboo at the moment - And not actively maintaining this project either (I did the plugin on my own time, when I worked in consultancy... ).    The code, however, is really not that complex, so should be easy to customize for any needs  

            This feature would be useful to differentiate nighlty builds from build triggered being the day. For example we want to execute an extra static code analysis task for nightly builds but not in the day. This could be done if we had a trigger variable in combination with the Conditional tasks for Bamboo plugin.

            At this moment we use different Bamboo builds to achieve this.

            Charlie Misonne added a comment - This feature would be useful to differentiate nighlty builds from build triggered being the day. For example we want to execute an extra static code analysis task for nightly builds but not in the day. This could be done if we had a trigger variable in combination with the Conditional tasks for Bamboo plugin. At this moment we use different Bamboo builds to achieve this.

            xr600 added a comment -

            It has been a while now, since I worked with Bamboo CI... Actually kind of figured that this feature was implemented as standard by now .

             

            Seems that nobody has forked the project on gitHub either though -  Maybe that is related to my missing response regarding licensing. I will look into that ASAP. If I understand you correctly, it should not be very difficult to implement more trigger types. But if I am to do it, I need some time to catch up with later versions of Bamboo + Atlas .

             

             

            xr600 added a comment - It has been a while now, since I worked with Bamboo CI... Actually kind of figured that this feature was implemented as standard by now .   Seems that nobody has forked the project on gitHub either though -  Maybe that is related to my missing response regarding licensing. I will look into that ASAP. If I understand you correctly, it should not be very difficult to implement more trigger types. But if I am to do it, I need some time to catch up with later versions of Bamboo + Atlas .    

            I wonder if it could make sense to allow to overwrite plan variables for automated triggers similarly as for manual triggers. So for each trigger one can define the value of plan variables.

            VolkerStampa added a comment - I wonder if it could make sense to allow to overwrite plan variables for automated triggers similarly as for manual triggers. So for each trigger one can define the value of plan variables.

            @staneykurdzeill Thanks, it isn't much really... Anyway: I sat up a repo for you guys to fork

             

            https://github.com/TorbenHedstrom/Bamboo-Trigger-Responder/blob/develop/README.md

             

            Could be nice if this could actually improve and go somewhere  

             

            Licencewise I haven't really decided yet, too much going on at the moment to be bothered by the fine print

            Torben Hedstrøm added a comment - @staneykurdzeill Thanks, it isn't much really... Anyway: I sat up a repo for you guys to fork   https://github.com/TorbenHedstrom/Bamboo-Trigger-Responder/blob/develop/README.md   Could be nice if this could actually improve and go somewhere     Licencewise I haven't really decided yet, too much going on at the moment to be bothered by the fine print

            @torbenhedstrom Nice work =)  Are you willing to share the source code? And if so under what license?  Apache 2.0 or MIT are good choices: https://choosealicense.com/

            Stanley Kurdziel added a comment - @torbenhedstrom Nice work =)  Are you willing to share the source code? And if so under what license?  Apache 2.0 or MIT are good choices:  https://choosealicense.com/

            xr600 added a comment -

            Version 1.0 uploaded here... I have tested it in our prod (Bamboo 5.7.2) environment. Let me know if you have any questions...

            Installation is just uploading from the Add-on administration.

            Regards.

            xr600 added a comment - Version 1.0 uploaded here... I have tested it in our prod (Bamboo 5.7.2) environment. Let me know if you have any questions... Installation is just uploading from the Add-on administration. Regards.

            xr600 added a comment -

            Sorry... Was logged in as a wrong user.

            So... I am done with the first beta version. It's running in our CI-environment.

            Haven't uploaded/released it anywhere official yet. Primarily because I still need to translate to other languages than English, and add Unit tests. However... If anyone is interested, I can upload or mail the betarelease.

            Attached are a few screenshots (remember: It is pretty much customized for my own personal needs, at the moment

            xr600 added a comment - Sorry... Was logged in as a wrong user. So... I am done with the first beta version. It's running in our CI-environment. Haven't uploaded/released it anywhere official yet. Primarily because I still need to translate to other languages than English, and add Unit tests. However... If anyone is interested, I can upload or mail the betarelease. Attached are a few screenshots (remember: It is pretty much customized for my own personal needs, at the moment

              851f15845f55 Mateusz Szmal
              8a5055fba4d0 Gail Stewart
              Votes:
              44 Vote for this issue
              Watchers:
              34 Start watching this issue

                Created:
                Updated:
                Resolved: