On Tue, Jun 28, 2016 at 12:47 PM David Binney <[email protected]> wrote:

>
> On Tuesday, 28 June 2016 17:41:42 UTC+10, Ketan Padegaonkar wrote:
>
>> On Tue, Jun 28, 2016 at 12:47 PM David Binney <[email protected]> wrote:
>>
>>> Thanks david and Moritz for the help,
>>>
>>> I am attempting this now which seems like it will do the trick, but am
>>> getting a little confused by the documentation on artifacts and fetching. I
>>> have attached a screenshot where it creates an artifacts into a "pkg"
>>> directory, but then the fetch uses the original source to retrieve? is that
>>> correct as i thought you would consume from the pkg directory with the
>>> fetch?
>>>
>>
>> Looks like a bug in the documentation. The downstream pipeline should
>> probably be using "pkg/commonlib.dll" to fetch a specific file, or "pkg" to
>> fetch the entire directory in case you want to pull down multiple
>> artifacts. Would you mind submitting a PR with a new screenshot?
>>
>
> Happy to add a PR, where is the tracker for it? Also, i suspected as much,
> but have been attempting to use the directory which does not seem to work.
> A file fully specified is ok but not pulling the folder.
>

Depending on which site it is, you'd find all sites listed at
https://github.com/gocd


>
>>
>> Also, can i use parameters to fetch the files as in source :
>>> build_path/${environment}.apache_vhost.conf
>>>
>>
> How about environment variables from go-cd pipeline?
>

Environment variables only apply to tasks that are executed by GoCD. You'd
need to use parameters instead. I don't know enough about your situation,
but this is what could work for you.

<pipeline name="foo">
  <params>
    <param name="environment">prod</param>
  </params>
  <environmentVariables>
    <variable name="environment"><value>#{environment}</value></variable>
  <environmentVariables>

  ...
  <fetchartifact ... src="build_path/#{environment}.apache_vhost.conf" />
  ...
</pipeline>


>
>> If by parameters, you mean pipeline parameters
>> <https://docs.go.cd/current/configuration/admin_use_parameters_in_configuration.html>,
>> then yes *"build_path/#{environment}.apache_vhost.conf"*. You cannot
>> user other "parameters" like environment name in pipeline configs.
>>
>>
>> --
> 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.

Reply via email to