Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
ci-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
xrow-public
ci-tools
Commits
6e3d73b6
Commit
6e3d73b6
authored
5 months ago
by
Björn Dieding
Browse files
Options
Downloads
Patches
Plain Diff
fix: Update variable name in ci_helm_get_chart_version function
parent
c40fbb39
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/lib/azure.sh
+7
-4
7 additions, 4 deletions
scripts/lib/azure.sh
scripts/lib/helm.sh
+3
-3
3 additions, 3 deletions
scripts/lib/helm.sh
with
10 additions
and
7 deletions
scripts/lib/azure.sh
+
7
−
4
View file @
6e3d73b6
...
@@ -14,12 +14,15 @@ if [[ -v AGENT_NAME ]]; then
...
@@ -14,12 +14,15 @@ if [[ -v AGENT_NAME ]]; then
if
[[
!
-v
CI_COMMIT_BRANCH
]]
;
then
if
[[
!
-v
CI_COMMIT_BRANCH
]]
;
then
CI_COMMIT_BRANCH
=
"
${
BUILD_SOURCEBRANCH
}
"
CI_COMMIT_BRANCH
=
"
${
BUILD_SOURCEBRANCH
}
"
fi
fi
if
[[
!
-v
CI_COMMIT_
BRANCH
]]
;
then
if
[[
!
-v
CI_COMMIT_
MESSAGE
]]
;
then
BUILD_SOURCEVERSION
MESSAGE
=
"
${
BUILD_SOURCEVERSIONMESSAGE
}
"
CI_COMMIT_
MESSAGE
=
"
${
BUILD_SOURCEVERSIONMESSAGE
}
"
fi
fi
if
[[
!
-v
CI_COMMIT_REF_SLUG
]]
;
then
if
[[
!
-v
CI_COMMIT_REF_SLUG
]]
;
then
echo
"[warning] Azure will not set the branch name. Please set CI_COMMIT_REF_SLUG"
if
[[
-v
CI_COMMIT_TAG
]]
;
then
CI_COMMIT_REF_SLUG
=
"
${
BUILD_SOURCEBRANCHNAME
}
"
CI_COMMIT_REF_SLUG
=
"
${
CI_COMMIT_TAG
}
"
else
CI_COMMIT_REF_SLUG
=
"
${
BUILD_SOURCEBRANCHNAME
}
"
fi
fi
fi
if
[[
!
-v
CI_COMMIT_SHA
]]
;
then
if
[[
!
-v
CI_COMMIT_SHA
]]
;
then
CI_COMMIT_SHA
=
"
${
BUILD_SOURCEVERSION
}
"
CI_COMMIT_SHA
=
"
${
BUILD_SOURCEVERSION
}
"
...
...
This diff is collapsed.
Click to expand it.
scripts/lib/helm.sh
+
3
−
3
View file @
6e3d73b6
...
@@ -471,12 +471,12 @@ function ci_helm_get_release_tag() {
...
@@ -471,12 +471,12 @@ function ci_helm_get_release_tag() {
}
}
function
ci_helm_get_chart_version
()
{
function
ci_helm_get_chart_version
()
{
local
chart
=
"
${
1
:-
./chart/
}
"
local
chart
_ref
=
"
${
1
:-
./chart/
}
"
local
chart_version
=
""
local
chart_version
=
""
if
[[
!
-f
"
${
chart
}
Chart.yaml"
]]
;
then
if
[[
!
-f
"
${
chart
_ref
}
Chart.yaml"
]]
;
then
chart_version
=
"
$(
cat
${
chart
}
Chart.yaml |
sed
's/^version: ([0-9\.]*)$/\1/p'
-E
-n
)
"
chart_version
=
"
$(
cat
${
chart
}
Chart.yaml |
sed
's/^version: ([0-9\.]*)$/\1/p'
-E
-n
)
"
else
else
chart_version
=
$(
sed
-E
's/(.*):(.*)/\2/g;'
<<<
$chart
)
chart_version
=
$(
sed
-E
's/(.*):(.*)/\2/g;'
<<<
$chart
_ref
)
fi
fi
echo
"
$chart_version
"
echo
"
$chart_version
"
return
0
return
0
...
...
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