[JIRA] (JENKINS-39394) Consistent notification usage between stage-level and top level

3 views
Skip to first unread message

pwolf@cloudbees.com (JIRA)

unread,
Oct 31, 2016, 11:54:01 PM10/31/16
to jenkinsc...@googlegroups.com
Patrick Wolf created an issue
 
Jenkins / Improvement JENKINS-39394
Consistent notification usage between stage-level and top level
Issue Type: Improvement Improvement
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2016/Nov/01 3:53 AM
Priority: Minor Minor
Reporter: Patrick Wolf

We currently have postBuild and notifications sections at the top level of pipeline. It is possible to send notifications in either of them. Notifications in postBuild are sent from a node while notifications within notifications are sent outside of a node. Some plugins like 'email-ext' must be within a node to work and will not work in the notifications section.

Within a stage we have only a post section but no notifications section. All notifications within a stage must be done in the post block.

This inconsistency between stage-level settings and top-level settings and support for different plugins creates unneeded complexity in trying to document best practices for usage.

We should either create a notifications section at the stage level or document how to do notifications with post and postBuild only.

cc: Michael Neale James Dumay

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

jdumay@cloudbees.com (JIRA)

unread,
Oct 31, 2016, 11:57:01 PM10/31/16
to jenkinsc...@googlegroups.com

Some plugins like 'email-ext' must be within a node to work and will not work in the notifications section

Why is that? How fixable is it?

pwolf@cloudbees.com (JIRA)

unread,
Nov 1, 2016, 12:11:01 AM11/1/16
to jenkinsc...@googlegroups.com

Even if we fix all the plugins like email-ext then we still have inconsistent usage between stage-level and top-level. Email-ext's reliance on a node only compounds this inconsistency.

mneale@cloudbees.com (JIRA)

unread,
Nov 1, 2016, 12:24:01 AM11/1/16
to jenkinsc...@googlegroups.com

email-ext is not "broken" in this sense, it lets you attach files from the workspace to an email, which is a useful thing. There is no way to fix that as it needs access to a workspace (if files were archived, it could pick it form there but that seems to be making busy-work).

I would be happy if notifications were an alias to postBuild. Its just documenting the pipeline, not behavior. If we have to explain subtle differences then we have already lost.

Andrew Bayer

unread,
Nov 1, 2016, 1:01:05 AM11/1/16
to jenkinsc...@googlegroups.com

Due to how things are implemented at runtime, I don't think we can do aliasing.

andrew.bayer@gmail.com (JIRA)

unread,
Nov 2, 2016, 3:10:01 PM11/2/16
to jenkinsc...@googlegroups.com
Andrew Bayer started work on Improvement JENKINS-39394
 
Change By: Andrew Bayer
Status: Open In Progress

andrew.bayer@gmail.com (JIRA)

unread,
Nov 2, 2016, 4:40:01 PM11/2/16
to jenkinsc...@googlegroups.com

scm_issue_link@java.net (JIRA)

unread,
Nov 15, 2016, 12:57:03 PM11/15/16
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Improvement JENKINS-39394
 
Re: Consistent notification usage between stage-level and top level

Code changed in jenkins
User: Andrew Bayer
Path:
pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTBuildConditionsContainer.java
pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTNotifications.java
pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPipelineDef.java
pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidator.java
pipeline-model-api/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorTest.java
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/AbstractBuildConditionResponder.groovy
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Notifications.groovy
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Root.groovy
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/JSONParser.groovy
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy
pipeline-model-definition/src/main/resources/ast-schema.json
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BuildConditionResponderTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/JobPropertiesTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ParametersTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/PostStageTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/TriggersTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WrappersTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ExecuteConvertedTest.java
pipeline-model-definition/src/test/resources/abortedNotification.groovy
pipeline-model-definition/src/test/resources/buildConditionOrdering.groovy
pipeline-model-definition/src/test/resources/errors/duplicateNotificationConditions.groovy
pipeline-model-definition/src/test/resources/errors/emptyNotifications.groovy
pipeline-model-definition/src/test/resources/errors/invalidBuildCondition.groovy
pipeline-model-definition/src/test/resources/errors/notificationsSectionRemoved.groovy
pipeline-model-definition/src/test/resources/errors/rejectParallelInNotifications.groovy
pipeline-model-definition/src/test/resources/failingNotifications.groovy
pipeline-model-definition/src/test/resources/failingPipeline.groovy
pipeline-model-definition/src/test/resources/failingPostBuild.groovy
pipeline-model-definition/src/test/resources/json/errors/emptyNotifications.json
pipeline-model-definition/src/test/resources/json/errors/invalidBuildCondition.json
pipeline-model-definition/src/test/resources/json/errors/notificationsSectionRemoved.json
pipeline-model-definition/src/test/resources/json/postBuildAndNotifications.json
pipeline-model-definition/src/test/resources/json/simpleNotification.json
pipeline-model-definition/src/test/resources/notificationOnChangeChanged.groovy
pipeline-model-definition/src/test/resources/notificationOnChangeFailed.groovy
pipeline-model-definition/src/test/resources/postBuildAndNotifications.groovy
pipeline-model-definition/src/test/resources/postOnChangeChanged.groovy
pipeline-model-definition/src/test/resources/postOnChangeFailed.groovy
pipeline-model-definition/src/test/resources/postStage/failingNotifications.groovy
pipeline-model-definition/src/test/resources/postStage/globalAndLocalAlways.groovy
pipeline-model-definition/src/test/resources/postStage/localAll.groovy
pipeline-model-definition/src/test/resources/shInNotification.groovy
pipeline-model-definition/src/test/resources/simpleNotification.groovy
pipeline-model-definition/src/test/resources/unstableNotification.groovy
pipeline-model-definition/src/test/resources/unstablePost.groovy
http://jenkins-ci.org/commit/pipeline-model-definition-plugin/d95465079b2f354cfba69cfdbaad533de2f18044
Log:
JENKINS-39394 Removed notifications section.

scm_issue_link@java.net (JIRA)

unread,
Nov 15, 2016, 12:57:03 PM11/15/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Andrew Bayer
Path:

pipeline-model-api/pom.xml
pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ASTSchema.java
pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPipelineDef.java
pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPostBuild.java
pipeline-model-api/src/main/resources/ast-schema.json
pipeline-model-api/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ASTSchemaTest.java
pipeline-model-definition/pom.xml
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Root.groovy
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/Converter.groovy
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/JSONParser.groovy
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy
pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/endpoints/ModelConverterAction.java
pipeline-model-definition/src/main/resources/ast-schema.json
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/endpoints/ModelConverterActionTest.java
pipeline-model-definition/src/test/resources/buildConditionOrdering.groovy
pipeline-model-definition/src/test/resources/buildPluginParentPOM.groovy
pipeline-model-definition/src/test/resources/errors/duplicatePostBuildConditions.groovy
pipeline-model-definition/src/test/resources/errors/emptyPostBuild.groovy
pipeline-model-definition/src/test/resources/errors/invalidBuildCondition.groovy
pipeline-model-definition/src/test/resources/failingPipeline.groovy
pipeline-model-definition/src/test/resources/failingPostBuild.groovy
pipeline-model-definition/src/test/resources/json/errors/emptyPostBuild.json
pipeline-model-definition/src/test/resources/json/errors/invalidBuildCondition.json
pipeline-model-definition/src/test/resources/json/simplePostBuild.json
pipeline-model-definition/src/test/resources/postOnChangeChanged.groovy
pipeline-model-definition/src/test/resources/postOnChangeFailed.groovy
pipeline-model-definition/src/test/resources/postStage/globalAndLocalAlways.groovy
pipeline-model-definition/src/test/resources/postStage/localAll.groovy
pipeline-model-definition/src/test/resources/simplePostBuild.groovy
pipeline-model-definition/src/test/resources/unstablePost.groovy
http://jenkins-ci.org/commit/pipeline-model-definition-plugin/567066b49c0b7cf582377696317f08960bcd7407
Log:
[FIXED JENKINS-39394] Renamed "postBuild" to "post".

Also moved ast-schema.json to pipeline-model-api, where it should be.

andrew.bayer@gmail.com (JIRA)

unread,
Nov 15, 2016, 12:58:02 PM11/15/16
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:26:00 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Fixed
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages