-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed stable helm version download error #10746
Conversation
@@ -69,7 +68,12 @@ export async function getStableHelmVersion(): Promise<string> { | |||
try { | |||
const downloadPath = await toolLib.downloadTool('https://api.github.com/repos/helm/helm/releases/latest'); | |||
const response = JSON.parse(fs.readFileSync(downloadPath, 'utf8').toString().trim()); | |||
return response.body.tag_name; | |||
if (!response.tag_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
response.body.tag_name
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not in body anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have helmutility.ts at 2 places? Cannot we use only one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because of kubernetes-common
and kubernetes-common-v2
.
v2 was created to roll out the upgrade of vsts-task-lib
to azure-pipelines-task-lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan is to deprecate kubernetes-common
once all the dependent tasks start consuming azure-pipelines-task-lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
while downloading from https://api.github.com/repos/helm/helm/releases/latest, the position of tag_name had changed. Put a check for tag_name, if tag_name cannot be extracted then returning stable version