Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
uphrh-sb-devops
Commits
51b1058b
Unverified
Commit
51b1058b
authored
4 years ago
by
G33tha
Committed by
GitHub
4 years ago
Browse files
Options
Download
Patches
Plain Diff
added build tag for image name (#2113)
parent
2c0b6b31
release-3.4.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pipelines/build/nodebb/Jenkinsfile
+3
-3
pipelines/build/nodebb/Jenkinsfile
with
3 additions
and
3 deletions
+3
-3
pipelines/build/nodebb/Jenkinsfile
+
3
−
3
View file @
51b1058b
...
...
@@ -19,13 +19,13 @@ node('build-slave') {
checkout
scm
commit_hash
=
sh
(
script:
'git rev-parse --short HEAD'
,
returnStdout:
true
).
trim
()
branch_name
=
sh
(
script:
'git name-rev --name-only HEAD | rev | cut -d "/" -f1| rev'
,
returnStdout:
true
).
trim
()
build_tag
=
branch_name
+
"_"
+
commit_hash
build_tag
=
branch_name
+
"_"
+
commit_hash
+
"_"
+
env
.
BUILD_NUMBER
println
(
ANSI_BOLD
+
ANSI_YELLOW
+
"github_release_tag not specified, using the latest commit hash: "
+
commit_hash
+
ANSI_NORMAL
)
}
else
{
def
scmVars
=
checkout
scm
checkout
scm:
[
$class
:
'GitSCM'
,
branches:
[[
name:
"refs/tags/$params.github_release_tag"
]],
userRemoteConfigs:
[[
url:
scmVars
.
GIT_URL
]]]
build_tag
=
params
.
github_release_tag
build_tag
=
params
.
github_release_tag
+
"_"
+
env
.
BUILD_NUMBER
println
(
ANSI_BOLD
+
ANSI_YELLOW
+
"github_release_tag specified, building from github_release_tag: "
+
params
.
github_release_tag
+
ANSI_NORMAL
)
}
echo
"build_tag: "
+
build_tag
...
...
@@ -37,7 +37,7 @@ node('build-slave') {
sh
(
"cp pipelines/build/nodebb/* NodeBB"
)
print
"Environment will be : ${env.NODE_ENV}"
sh
(
'chmod 777 NodeBB/build.sh'
)
sh
(
"bash ./NodeBB/build.sh ${params.nodebb_branch}_${
commit_hash
} ${env.NODE_NAME} ${hub_org}"
)
sh
(
"bash ./NodeBB/build.sh ${params.nodebb_branch}_
_
${
build_tag
} ${env.NODE_NAME} ${hub_org}"
)
}
stage
(
'ArchiveArtifacts'
)
{
archiveArtifacts
"metadata.json"
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets