Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163708
D1099.id3468.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D1099.id3468.diff
View Options
diff --git a/jobs/templates/incoming-tag.groovy b/jobs/templates/incoming-tag.groovy
--- a/jobs/templates/incoming-tag.groovy
+++ b/jobs/templates/incoming-tag.groovy
@@ -1,11 +1,3 @@
-import jenkins.model.Jenkins
-
-@NonCPS
-def job_exists(name) {{
- def instance = jenkins.model.Jenkins.instance
- return instance.getItemByFullName(name) != null
-}}
-
pipeline {{
agent none
stages {{
@@ -31,7 +23,7 @@
stage('Build and upload PyPI package') {{
when {{
expression {{ params.GIT_TAG ==~ /v\d+(.\d+)+/ }}
- expression {{ job_exists('/{name}/pypi-upload') }}
+ expression {{ jobExists('/{name}/pypi-upload') }}
}}
steps {{
build(
@@ -46,7 +38,7 @@
stage('Debian packaging for new release') {{
when {{
expression {{ params.GIT_TAG ==~ /v\d+(.\d+)+/ }}
- expression {{ job_exists('/debian/packages/{name}/update-for-release') }}
+ expression {{ jobExists('/debian/packages/{name}/update-for-release') }}
}}
steps {{
build(
@@ -63,7 +55,7 @@
expression {{ params.GIT_TAG ==~ /debian\/.*/ }}
expression {{ !(params.GIT_TAG ==~ /debian\/upstream\/.*/) }}
expression {{ !(params.GIT_TAG =~ /_bpo/) }}
- expression {{ job_exists('/debian/packages/{name}/automatic-backport') }}
+ expression {{ jobExists('/debian/packages/{name}/automatic-backport') }}
}}
steps {{
build(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 30, 1:44 PM (8 h, 47 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216632
Attached To
D1099: Move job_exists to an external library
Event Timeline
Log In to Comment