Skip to content

Commit 94a146c

Browse files
msivasubramaniaanrgrunber
authored andcommitted
added update helm command
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
1 parent 3971484 commit 94a146c

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/odo/command.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ export class Command {
158158
return new CommandText('helm repo add openshift https://charts.openshift.io/');
159159
}
160160

161+
static updateHelmRepo(): CommandText {
162+
return new CommandText('helm repo update');
163+
}
164+
161165
static installHelmChart(name: string, chartName: string, version: string): CommandText {
162166
return new CommandText(`helm install ${name} openshift/${chartName} --version ${version}`);
163167
}

src/registriesView.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ export class ComponentTypesView implements TreeDataProvider<ComponentType> {
124124
return response;
125125
}
126126

127+
public async updateHelmRepo(): Promise<CliExitData> {
128+
const response = await getInstance().execute(Command.updateHelmRepo());
129+
return response;
130+
}
131+
127132
public async installHelmChart(name: string, chartName: string, version: string): Promise<CliExitData> {
128133
const data = await getInstance().execute(Command.installHelmChart(name, chartName, version));
129134
return data;

src/webview/helm-chart/helmChartLoader.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export default class HelmChartLoader {
112112
async function getHelmCharts(eventName: string): Promise<void> {
113113
if (helmRes.length === 0) {
114114
await ComponentTypesView.instance.addHelmRepo();
115+
await ComponentTypesView.instance.updateHelmRepo();
115116
const signupResponse = await fetch('https://charts.openshift.io/index.yaml', {
116117
method: 'GET'
117118
});

0 commit comments

Comments
 (0)