Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark pipeline waitForBuild step with the downstream build result #112

Merged
merged 5 commits into from
Apr 28, 2023

Conversation

stuartrowe
Copy link
Contributor

@stuartrowe stuartrowe commented Apr 3, 2023

Add a WarningAction to the waitForBuild step FlowNode when the downstream build isn't successful.

Also, log the build result when the downstream run completes.

This is the waitForBuild step equivalent of #107.

Implements https://issues.jenkins.io/browse/JENKINS-70983

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@stuartrowe
Copy link
Contributor Author

Exception during Publish Coverage Report step:

java.util.concurrent.ExecutionException: Invalid object ID 66 iota=70

@stuartrowe stuartrowe closed this Apr 3, 2023
@stuartrowe
Copy link
Contributor Author

Re-opening to trigger a new build.

@stuartrowe stuartrowe reopened this Apr 3, 2023
@stuartrowe stuartrowe force-pushed the JENKINS-70983 branch 3 times, most recently from 1ca3981 to f01a141 Compare April 5, 2023 16:28
@stuartrowe
Copy link
Contributor Author

@car-roll @olamy please review when you have a chance.

@stuartrowe
Copy link
Contributor Author

@car-roll @olamy poking for a review.

Copy link
Member

@olamy olamy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@stuartrowe
Copy link
Contributor Author

@olamy could you please merge this so it can be released? Thanks!

@olamy olamy enabled auto-merge (squash) April 28, 2023 01:37
@olamy olamy disabled auto-merge April 28, 2023 01:38
@olamy olamy merged commit 1fec530 into jenkinsci:master Apr 28, 2023
"} finally {\n" +
" echo \"'ds' completed with status ${ds.getResult()}\"\n" +
"}", true));
j.assertLogContains("'ds' completed with status UNSTABLE", j.buildAndAssertStatus(Result.UNSTABLE, us));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sometimes fails: the message is printed but the upstream build is marked a success. The need for

is a clue that the test is unreliable;
taskListener.getLogger().println(runHyperLink + " is already complete");
getContext().onSuccess(null);
does not take into account propagate. If that behavior is intentional, then fixing the test properly would mean deleting the sleep and instead having the downstream build pause until a semaphore is set by test code after the upstream build starts waiting.

CJohanH pushed a commit to CJohanH/buildWithEiffel that referenced this pull request Feb 9, 2024
This is a new pipeline step that extends BuildTriggerStep from
jenkinsci/pipeline-build-step-plugin#112 in order to add a new build
action EiffelActivityDataAction to the downstream build. This build action
will supplement Eiffel activity data that will override corresponding
data fields in the EiffelActivityTriggeredEvent when the downstream build
enters the build queue.

Unfortunately, in order to add a new action to triggered builds, the step execution
of BuildTriggerStep had to be modified, which meant that a number of project files
had to be copied with slight modifications to ensure that there is no interference
when running with both jenkinsci/eiffel-broadcaster-plugin and
jenkinsci/pipeline-build-step-plugin. Also, to ensure the underlying build trigger
functionality inherited by the buildWithEiffel step, a regression test suite
has been added, containing all the BuildTriggerStep tests. These tests have
been updated to use buildWithEiffel and the suite itself is excluded from
normal testing to reduce execution time.

Currently, buildWithEiffel step only supports activity name.
magnusbaeck pushed a commit to jenkinsci/eiffel-broadcaster-plugin that referenced this pull request Mar 7, 2024
This is a new pipeline step that extends BuildTriggerStep from
jenkinsci/pipeline-build-step-plugin#112 in order to add a new build
action EiffelActivityDataAction to the downstream build. This build 
action will supplement Eiffel activity data that will override
corresponding data fields in the EiffelActivityTriggeredEvent when
the downstream build enters the build queue.

Unfortunately, in order to add a new action to triggered builds,
the step execution of BuildTriggerStep had to be modified, which
meant that a number of project files had to be copied with slight
modifications to ensure that there is no interference when running
with both jenkinsci/eiffel-broadcaster-plugin and
jenkinsci/pipeline-build-step-plugin. Also, to ensure the underlying 
build trigger functionality inherited by the buildWithEiffel step,
a regression test suite has been added, containing all the
BuildTriggerStep tests. These tests have been updated to use
buildWithEiffel and the suite itself is excluded from normal testing
to reduce execution time.

Currently, buildWithEiffel step only supports activity name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants