Ping! On Friday, July 31, 2015 at 6:54:12 PM UTC+3, Ming Xie wrote: > > I thought the Git feature branch plugin could help this a bit: > https://github.com/ashwanthkumar/gocd-build-github-pull-requests > > However, I couldn't figure out how to configure it to do what we want > here. Has anyone tried that plug-in? > > -Ming > > On Wednesday, April 16, 2014 at 12:41:23 PM UTC-4, [email protected] > wrote: >> >> Hello Aravind: >> >> Thank you for your response. >> >> The ultimate goal is to to make it easy for test to utilize different >> Git branches to be run without adding a new pipeline. It may be that the >> best solution is to utilize cloning and/or templates. I was also hoping >> for a solutin that could be done using REST APIs in case somebody has a low >> bandwith connection. >> >> Steven >> >> >> On Wednesday, April 16, 2014 2:24:05 AM UTC-7, Aravind SV wrote: >> >>> Hey Steven, >>> >>> As you found, you can use a parameter to specify a git branch. But, you >>> cannot use an environment variable in the way you mentioned. The >>> environment variable is made available only during runtime, and not during >>> configuration time. >>> >>> If you want, you can setup a GIT_BRANCH (on any environment variable) to >>> a specific value, and use that in any custom command. However, changing the >>> value of that, doesn't cause the Go agent to checkout the specific branch. >>> The decision of which branch to use is made very early on the Go server >>> side itself. The branch name is used to decide what branch to wait for >>> commits on. >>> >>> You can potentially run something like a: git reset --hard some-branch, >>> in a task, but I'm not sure I'd recommend doing that. >>> >>> What exactly are you trying to do, with that variable name for a branch? >>> >>> Cheers, >>> Aravind >>> >>> >>> On Mon, Apr 14, 2014 at 11:38 PM, <[email protected]> wrote: >>> >>>> Hello folks: >>>> >>>> I am trying to allow Go users to specify a git branch when they use >>>> the "Trigger with options" feature of GUI, or use the PIPELINE API to >>>> launch a pipe. Unfrotunately my atempts have not yet succeeded. >>>> >>>> I created an environmental variable GIT_BRANCH and put ${GIT_BRANCH} >>>> in the "Branch" text box that is on the "Edit Material - Git" page. >>>> When I try to run the pipeline via the GUI, a red failure notice came >>>> up in the lower left hand corner of the screen, and when I selected this >>>> notice received a pop up box that read >>>> >>>> Modification check failed for material: URL: >>>> http://path/to/repository.git, Branch: ${GIT_BRANCH} [Apr-14 14:49:17] >>>> ERROR: fatal: ambiguous argument 'origin/${GIT_BRANCH}': unknown >>>> revision or path not in the working tree. ERROR: Use '--' to separate >>>> paths >>>> from revisions >>>> >>>> Except that the actual URL different. >>>> >>>> In the "Basic Settings" page of a pipline the default "Label >>>> Template" is set to >>>> >>>> >>>> ${COUNT} >>>> >>>> >>>> Since an evniomental variable is used to set to specify a template, >>>> it seemed reasonable to attempt to use an envrionmental variable to >>>> specify a branch. >>>> >>>> I also tried using ${env.GIT_BRANCH}, ${go.GIT_BRANCH} and $GIT_BRANCH >>>> as well, and each time the paramter is not treated as a parameter (not >>>> expanded). >>>> >>>> I removed the attempt to set the branch, and added a job that executed >>>> /usr/bin/env, ran the pipeline and in the console ouptut contqained both >>>> >>>> >>>> [go] setting environment variable 'GIT_BRANCH' to value 'develop' >>>> >>>> and >>>> >>>> GIT_BRANCH=develop >>>> >>>> Thus the paramter is being set. >>>> >>>> I was able to use a parameter to specify a gt branch, but I assume >>>> that a parameter's value is not meant to be overwitten.when a pipeline is >>>> started. >>>> >>>> >>>> I am using Ubuntu linux, release 3.11.0-19-generic. >>>> >>>> Has anybody else been able to use a variable to specify a branch? If >>>> so, were you succesful, and what operating system where you using? >>>> >>>> Thank you >>>> >>>> Steven Widom >>>> [email protected] <https://profiles.google.com/?hl=en&tab=gX> >>>> >>>> P.S. I am speaking for myself, not my employer. >>>> >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "go-cd" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>>
-- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
