Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
continuous-publish-plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
adi-ia
continuous-publish-plugin
Commits
718f28a5
Commit
718f28a5
authored
8 years ago
by
Nicholas Blair
Browse files
Options
Downloads
Patches
Plain Diff
feat: add artifact-version.groovy expected by Jenkins build
parent
965b82ff
No related branches found
No related tags found
1 merge request
!2
feat: always populate MANIFEST with project.name and .version
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
artifact-version.groovy
+17
-0
17 additions, 0 deletions
artifact-version.groovy
with
17 additions
and
0 deletions
artifact-version.groovy
0 → 100644
+
17
−
0
View file @
718f28a5
// Script executed by Jenkins build
// Get project version version and assign to ARTIFACT_VERSION parameter
import
hudson.model.*
import
java.util.jar.*
def
build
=
Thread
.
currentThread
().
executable
Manifest
manifest
=
new
Manifest
(
new
FileInputStream
(
new
File
(
"${build.workspace}/build/tmp/jar/MANIFEST.MF"
)));
def
version
=
manifest
.
getAttributes
().
getValue
(
Attributes
.
Name
.
IMPLEMENTATION_VERSION
)
println
"Artifact version is $version"
build
.
addAction
(
new
ParametersAction
([
new
StringParameterValue
(
"ARTIFACT_VERSION"
,
version
),
])
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment