Skip to content
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

Merged
merged 6 commits into from
Jun 25, 2019
Merged

Conversation

Anumita
Copy link
Contributor

@Anumita Anumita commented Jun 25, 2019

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

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

response.body.tag_name?

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor

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

Tasks/HelmInstallerV0/task.json Outdated Show resolved Hide resolved
Copy link
Contributor

@thesattiraju thesattiraju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Anumita Anumita merged commit d26efda into master Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants