Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-20498

Build failing on "Non required shared artifact"

    XMLWordPrintable

Details

    Description

      Steps to reproduce

      1. Create a build with 2 stages, 1 of them a final stage.
      2. In the first stage, add N jobs that generate an artifact.
      3. Each job should generate an artifact:
        1. Make them search for */.log or something.
        2. Untick "required".
      4. Create a task in the job that generates a "log" file (let's call it "job-with-no-log").
      5. Update one of the jobs to not output any log files at all (so that the artifact will fail to generate).
      6. Create a job in the final stage that will collect all of the log files from all of the artifacts and concatenate them together.
        1. You should use artifact subscriptions for this.
      7. Run the build.

      Expected results

      The final stage's task will execute successfully when one of the configured shared artifacts is absent.

      Actual results

      Failure in artifact preparation phase during processing of: Subscription for Non required shared artifact: [job-with-no-log], pattern: [**/*.log], destination: [input]
      1 error(s) found when performing pre-build actions.
      

      My notes

      • The wording of the error message in the final stage's build logs is confusing. If the artifact was "non required", why did the build fail?
      • The "Required" checkbox for artifacts states that "Build fails if the artifact cannot be published." However, the job that generates the artifact actually does fail? That's a mismatch of expectations

      Bamboo seems to be torn between making builds fail loudly vs. allowing builds to continue when some data is absent. My expectation was that by unticking "required" on an artifact definition, any subsequent subscriptions to that artifact would work (as in, silently ignore the non-existence of it). It seems the Bamboo team's thinking does not match mine. I can appreciate that the intention is probably that builds fail if "unexpected" things happen, but this artifact is definitely optional as far as my build is concerned; it can cope just fine without it and I would expect the build to pass accordingly.

      I'd be interested in workarounds, but I'd also be keen to see the behaviour (or at least the wording) become less confusing.

      Attachments

        Issue Links

          Activity

            People

              851f15845f55 Mateusz Szmal
              cdarroch Daz
              Votes:
              17 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: