Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SmartDataLab
public
applications
renovate
Commits
d67f5a69
Commit
d67f5a69
authored
5 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix(helm-values): better extract error handling
parent
178e3561
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/manager/helm-values/extract.ts
+9
-10
9 additions, 10 deletions
lib/manager/helm-values/extract.ts
with
9 additions
and
10 deletions
lib/manager/helm-values/extract.ts
+
9
−
10
View file @
d67f5a69
...
@@ -37,24 +37,23 @@ function findDependencies(
...
@@ -37,24 +37,23 @@ function findDependencies(
}
}
export
function
extractPackageFile
(
content
:
string
):
PackageFile
{
export
function
extractPackageFile
(
content
:
string
):
PackageFile
{
let
parsedContent
;
try
{
try
{
// a parser that allows extracting line numbers would be preferable, with
// a parser that allows extracting line numbers would be preferable, with
// the current approach we need to match anything we find again during the update
// the current approach we need to match anything we find again during the update
const
parsedContent
=
yaml
.
safeLoad
(
content
,
{
json
:
true
});
parsedContent
=
yaml
.
safeLoad
(
content
,
{
json
:
true
});
}
catch
(
err
)
{
logger
.
debug
(
logger
.
info
({
err
},
'
Failed to parse helm-values YAML
'
);
{
parsedContent
},
return
null
;
'
Trying to find dependencies in helm-values
'
}
);
try
{
const
deps
=
findDependencies
(
parsedContent
,
[]);
const
deps
=
findDependencies
(
parsedContent
,
[]);
if
(
deps
.
length
)
{
if
(
deps
.
length
)
{
logger
.
debug
({
deps
},
'
Found dependencies in helm-values
'
);
logger
.
debug
({
deps
},
'
Found dependencies in helm-values
'
);
return
{
deps
};
return
{
deps
};
}
}
}
catch
(
err
)
{
}
catch
(
err
)
/* istanbul ignore next */
{
logger
.
error
({
err
},
'
Failed to
pars
e
helm-values
file
'
);
logger
.
error
({
err
},
'
Error
pars
ing
helm-values
parsed content
'
);
}
}
return
null
;
return
null
;
}
}
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