#gocd

/

      • jasondotstar has quit
      • jasondotstar joined the channel
      • jasondotstar has quit
      • stanchan joined the channel
      • arvindsv joined the channel
      • stanchan joined the channel
      • arvindsv has quit
      • laser` joined the channel
      • arvindsv joined the channel
      • arvindsv is now known as Guest88724
      • jasondotstar joined the channel
      • aps
        Is there any option to set a parameter from Environment Variable?
      • or set branch name of git material via environment variable?
      • Basically I need the ability to run pipeline for a specific branch by overriding the env variable.
      • astrumas joined the channel
      • Guest88724 has quit
      • Guest88724 joined the channel
      • Guest88724 has quit
      • arvindsv joined the channel
      • rsoares_ joined the channel
      • rsoares_ is now known as rsoares
      • philmacfly
        aps: afaik you can override a GO env var within the pipeline
      • aps
        philmacfly: I get that, but how do I use that while specifying branch of a material?
      • philmacfly: I can use #{BRANCH} to use parameter, but how do we write for env variables?
      • michel_slm joined the channel
      • codekobe has quit
      • codekobe joined the channel
      • laser` has quit
      • stanchan joined the channel
      • arvindsv has quit
      • mjuszczak joined the channel
      • mjuszczak
        I'm trying to get a job to print the output (which is STDERR)
      • arvindsv joined the channel
      • arvindsv has quit
      • jasondotstar has quit
      • jasondotstar joined the channel
      • arvindsv joined the channel
      • Is anyone around by chance?
      • arvindsv
        Hello.
      • I'm around. What's up?
      • robawt
        gchristensen: many days later, thanks for the respose :)
      • mjuszczak
        arvindsv: With a custom command (IE: "/bin/bash -c echo 'Hello, world'"), what's the simplest way to fail if return code is not 0? For some reason I thought a stage was set to fail if return code was not 0 but it isn't.
      • arvindsv
        A task that fails with a non-zero exit code will fail the job and then the stage. That's the default (and only) behavior. Can you give me a little more details about the script? The exit code does depend on the command, usually.
      • Like this
      • $ /bin/bash -c 'echo hello'; echo $?
      • hello
      • 0
      • $ /bin/bash -c 'false'; echo $?
      • 1
      • $ /bin/bash -c 'true'; echo $?
      • 0
      • Is it possible that the custom script you're running is not exiting with the right code?
      • mjuszczak
        up!
      • that was it, thank you!
      • So what are the uses of test artifacts then?
      • arvindsv
        Test artifacts are a reporting mechanism. Anything marked as a test artifact will be parsed as an xUnit file, if possible and errors in it will be shown in the Failures tab.
      • mjuszczak
        OK. Awesome. Thank you. Finally, if I had multiple chef cookbooks I want to test, would I make a single pipeline and put all of them as materials? Or would I want to create different pipelines for each cookbook?
      • For each cookbook in a list of 30 or so, I want to run a few stages and a few commands, and eventually upload it. Same exact configuration, just a different source each time.
      • arvindsv
        It depends. There's no one way. Do you really have those cookbooks in different repos? If so, maybe you want 30 pipelines. Otherwise, maybe you have them all in the same repo, and want 30 jobs, that'll run every time there's a change in the repo. But then, you'll need to publish all cookbooks every time, since you won't know which one changed in the repo (easily). If you have 30 repos, and want 30 pipelines
      • , you might want to look at using a template instead. Will really cut down on the repetition in your config.
      • mjuszczak
        Yeah, each of them is a separate repo
      • Looks like if I add more materials to the same pipeline though, it sends each of those materials through all of the stages.
      • Is that a weird way of doing it though?
      • But yes, they are indeed separate "projects".
      • arvindsv
        Then having a pipeline with 30 repos as materials doesn't make much sense to me. Yes, any time any material changes, the pipeline runs (for all 30 materials). If you really want independence between the repos, treat them as different pipelines.
      • Yes, separate projects and pipelines.
      • Again, you'll need to take a call.
      • But, given what I know from what you said ...
      • ... I'd use a template and 30 pipelines from that template.
      • Only thing that would change is the material.
      • gchristensen
        robawt: haha, cheers :)
      • mjuszczak
        ohhhh, got it
      • gchristensen
        ^ agreed
      • templates are darling
      • (are exactly why I chose go.cd over anything else)
      • mjuszczak has quit
      • mjuszczak joined the channel
      • mjuszczak has quit
      • mjuszczak joined the channel
      • mjuszczak has quit
      • mjuszczak joined the channel
      • mjuszczak has quit
      • mjuszczak joined the channel
      • jasondotstar joined the channel
      • mjuszczak has quit
      • mjuszczak joined the channel
      • mjuszczak
        Thanks gchristensen!
      • gchristensen
        cheers :)
      • (I have 3 templates and about 75 pipelines)
      • mjuszczak has quit
      • mjuszczak joined the channel
      • mjuszczak
        haha awesome
      • mjuszczak has quit
      • arvindsv has quit
      • jasondotstar joined the channel
      • mjuszczak joined the channel
      • arvindsv joined the channel
      • mjuszczak has quit
      • arvindsv has quit
      • stanchan has quit