-
Bug
-
Resolution: Not A Defect
-
Minor
-
both jenkins.2.164.2.war and jenkins.2.182.war
running on Linux Mint 19 Tara 64 bit
Java:
$ /opt/java/jdk_1.8/bin/java -version
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
Plugins:
Rebuilder (rebuild): 1.31
Pipeline: Step API (workflow-step-api): 2.19
Pipeline Utility Steps (pipeline-utility-steps): 2.3.0
SSH Slaves plugin (ssh-slaves): 1.29.4
Jackson 2 API Plugin (jackson2-api): 2.9.9
Matrix Project Plugin (matrix-project): 1.14
Docker Pipeline (docker-workflow): 1.18
Apache HttpComponents Client 4.x API Plugin (apache-httpcomponents-client-4-api): 4.5.5-3.0
Credentials Binding Plugin (credentials-binding): 1.18
SSH Credentials Plugin (ssh-credentials): 1.16
Pipeline: Input Step (pipeline-input-step): 2.10
Git client plugin (git-client): 2.7.7
GitHub API Plugin (github-api): 1.95
Token Macro Plugin (token-macro): 2.7
Command Agent Launcher Plugin (command-launcher): 1.3
Credentials Plugin (credentials): 2.1.19
Structs Plugin (structs): 1.19
Pipeline: Build Step (pipeline-build-step): 2.9
Pipeline (workflow-aggregator): 2.6
Branch API Plugin (branch-api): 2.5.2
Display URL API (display-url-api): 2.3.1
MapDB API Plugin (mapdb-api): 1.0.9.0
Pipeline: Milestone Step (pipeline-milestone-step): 1.3.1
Authentication Tokens API Plugin (authentication-tokens): 1.3
Pipeline: REST API Plugin (pipeline-rest-api): 2.11
Durable Task Plugin (durable-task): 1.29
PAM Authentication plugin (pam-auth): 1.5.1
Docker Commons Plugin (docker-commons): 1.15
Pipeline: Job (workflow-job): 2.32
Git plugin (git): 3.10.0
Pipeline: Declarative Agent API (pipeline-model-declarative-agent): 1.1.1
Pipeline: Multibranch (workflow-multibranch): 2.21
Pipeline: Nodes and Processes (workflow-durable-task-step): 2.30
SCM API Plugin (scm-api): 2.4.1
JUnit Plugin (junit): 1.28
Script Security Plugin (script-security): 1.59
Matrix Authorization Strategy Plugin (matrix-auth): 2.4.2
Timestamper (timestamper): 1.9
Subversion Plug-in (subversion): 2.12.1
GitHub Branch Source Plugin (github-branch-source): 2.5.3
Lockable Resources plugin (lockable-resources): 2.5
JSch dependency plugin (jsch): 0.1.55
Ant Plugin (ant): 1.9
Pipeline: Groovy (workflow-cps): 2.68
Pipeline: Declarative Extension Points API (pipeline-model-extensions): 1.3.8
Plain Credentials Plugin (plain-credentials): 1.5
Pipeline: Declarative (pipeline-model-definition): 1.3.8
LDAP Plugin (ldap): 1.20
Pipeline: API (workflow-api): 2.34
Folders Plugin (cloudbees-folder): 6.8
OWASP Markup Formatter Plugin (antisamy-markup-formatter): 1.5
Pipeline: Supporting APIs (workflow-support): 3.3
Pipeline Graph Analysis Plugin (pipeline-graph-analysis): 1.10
Logstash (logstash): 2.3.1
Gradle Plugin (gradle): 1.32
GIT server Plugin (git-server): 1.7
JavaScript GUI Lib: ACE Editor bundle plugin (ace-editor): 1.1
Pipeline: Stage Step (pipeline-stage-step): 2.3
Email Extension Plugin (email-ext): 2.66
Pipeline: Model API (pipeline-model-api): 1.3.8
JDK Tool Plugin (jdk-tool): 1.2
Pipeline: SCM Step (workflow-scm-step): 2.7
GitHub plugin (github): 1.29.4
JavaScript GUI Lib: Moment.js bundle plugin (momentjs): 1.1.1
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin (jquery-detached): 1.2.1
bouncycastle API Plugin (bouncycastle-api): 2.17
Resource Disposer Plugin (resource-disposer): 0.12
Pipeline: Stage View Plugin (pipeline-stage-view): 2.11
Build Timeout (build-timeout): 1.19
JavaScript GUI Lib: Handlebars bundle plugin (handlebars): 1.1.1
Pipeline: Shared Groovy Libraries (workflow-cps-global-lib): 2.13
Mailer Plugin (mailer): 1.23
Pipeline: Basic Steps (workflow-basic-steps): 2.16
Pipeline: Stage Tags Metadata (pipeline-stage-tags-metadata): 1.3.8
Workspace Cleanup Plugin (ws-cleanup): 0.37
Pipeline: GitHub Groovy Libraries (pipeline-github-lib): 1.0
both jenkins.2.164.2.war and jenkins.2.182.war running on Linux Mint 19 Tara 64 bit Java: $ /opt/java/jdk_1.8/bin/java -version java version "1.8.0_172" Java(TM) SE Runtime Environment (build 1.8.0_172-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode) Plugins: Rebuilder (rebuild): 1.31 Pipeline: Step API (workflow-step-api): 2.19 Pipeline Utility Steps (pipeline-utility-steps): 2.3.0 SSH Slaves plugin (ssh-slaves): 1.29.4 Jackson 2 API Plugin (jackson2-api): 2.9.9 Matrix Project Plugin (matrix-project): 1.14 Docker Pipeline (docker-workflow): 1.18 Apache HttpComponents Client 4.x API Plugin (apache-httpcomponents-client-4-api): 4.5.5-3.0 Credentials Binding Plugin (credentials-binding): 1.18 SSH Credentials Plugin (ssh-credentials): 1.16 Pipeline: Input Step (pipeline-input-step): 2.10 Git client plugin (git-client): 2.7.7 GitHub API Plugin (github-api): 1.95 Token Macro Plugin (token-macro): 2.7 Command Agent Launcher Plugin (command-launcher): 1.3 Credentials Plugin (credentials): 2.1.19 Structs Plugin (structs): 1.19 Pipeline: Build Step (pipeline-build-step): 2.9 Pipeline (workflow-aggregator): 2.6 Branch API Plugin (branch-api): 2.5.2 Display URL API (display-url-api): 2.3.1 MapDB API Plugin (mapdb-api): 1.0.9.0 Pipeline: Milestone Step (pipeline-milestone-step): 1.3.1 Authentication Tokens API Plugin (authentication-tokens): 1.3 Pipeline: REST API Plugin (pipeline-rest-api): 2.11 Durable Task Plugin (durable-task): 1.29 PAM Authentication plugin (pam-auth): 1.5.1 Docker Commons Plugin (docker-commons): 1.15 Pipeline: Job (workflow-job): 2.32 Git plugin (git): 3.10.0 Pipeline: Declarative Agent API (pipeline-model-declarative-agent): 1.1.1 Pipeline: Multibranch (workflow-multibranch): 2.21 Pipeline: Nodes and Processes (workflow-durable-task-step): 2.30 SCM API Plugin (scm-api): 2.4.1 JUnit Plugin (junit): 1.28 Script Security Plugin (script-security): 1.59 Matrix Authorization Strategy Plugin (matrix-auth): 2.4.2 Timestamper (timestamper): 1.9 Subversion Plug-in (subversion): 2.12.1 GitHub Branch Source Plugin (github-branch-source): 2.5.3 Lockable Resources plugin (lockable-resources): 2.5 JSch dependency plugin (jsch): 0.1.55 Ant Plugin (ant): 1.9 Pipeline: Groovy (workflow-cps): 2.68 Pipeline: Declarative Extension Points API (pipeline-model-extensions): 1.3.8 Plain Credentials Plugin (plain-credentials): 1.5 Pipeline: Declarative (pipeline-model-definition): 1.3.8 LDAP Plugin (ldap): 1.20 Pipeline: API (workflow-api): 2.34 Folders Plugin (cloudbees-folder): 6.8 OWASP Markup Formatter Plugin (antisamy-markup-formatter): 1.5 Pipeline: Supporting APIs (workflow-support): 3.3 Pipeline Graph Analysis Plugin (pipeline-graph-analysis): 1.10 Logstash (logstash): 2.3.1 Gradle Plugin (gradle): 1.32 GIT server Plugin (git-server): 1.7 JavaScript GUI Lib: ACE Editor bundle plugin (ace-editor): 1.1 Pipeline: Stage Step (pipeline-stage-step): 2.3 Email Extension Plugin (email-ext): 2.66 Pipeline: Model API (pipeline-model-api): 1.3.8 JDK Tool Plugin (jdk-tool): 1.2 Pipeline: SCM Step (workflow-scm-step): 2.7 GitHub plugin (github): 1.29.4 JavaScript GUI Lib: Moment.js bundle plugin (momentjs): 1.1.1 JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin (jquery-detached): 1.2.1 bouncycastle API Plugin (bouncycastle-api): 2.17 Resource Disposer Plugin (resource-disposer): 0.12 Pipeline: Stage View Plugin (pipeline-stage-view): 2.11 Build Timeout (build-timeout): 1.19 JavaScript GUI Lib: Handlebars bundle plugin (handlebars): 1.1.1 Pipeline: Shared Groovy Libraries (workflow-cps-global-lib): 2.13 Mailer Plugin (mailer): 1.23 Pipeline: Basic Steps (workflow-basic-steps): 2.16 Pipeline: Stage Tags Metadata (pipeline-stage-tags-metadata): 1.3.8 Workspace Cleanup Plugin (ws-cleanup): 0.37 Pipeline: GitHub Groovy Libraries (pipeline-github-lib): 1.0
Running the following Jenkins declarative pipeline job I would expect the output to be the same for each regular expression:
Here is the content of the pipeline:
pipeline{
agent{ node{ label('master')}}
stages{
stage('RegEx'){
steps{
script{
def m_ex
def m_in
stanza = '''Hello.
how are you doing?
It is a nice day.
Are we there yet?'''
m_ex = stanza =~ /(m?).nice./
if (m_ex){
println "Found: ${m_ex[0][0]}"
}else
if ((m_in = stanza =~ /(m?).nice./)){
println "Found: ${m_in[0][0]}"
}else
println GroovySystem.version
}
}
}
}
}
Here is the result:
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /var/lib/jenkins/workspace/Test/RegularExpression
[Pipeline] {
[Pipeline] stage
[Pipeline] { (RegEx)
[Pipeline] script
[Pipeline]
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS