Skip to content

Commit

Permalink
DEVOP-32: set directory to run commands
Browse files Browse the repository at this point in the history
  • Loading branch information
michperalbo-fsl committed May 17, 2024
1 parent b143ae0 commit be31a15
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
12 changes: 9 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24329,16 +24329,22 @@ function run(exec, context, core, env) {
core.info('Adding plugin helm v2to3');
yield exec('helm', ['plugin', 'install', 'https://github.com/helm/helm-2to3.git']);
core.info('Starting migration to helm v3');
yield exec('helm', [
'--kubeconfig', `../kilauea/kubefiles/${environment}/kubectl_configs/${environment}-kube-config-beta-admins.yml`,
yield exec('helm', ['--kubeconfig', `../kilauea/kubefiles/${environment}/kubectl_configs/${environment}-kube-config-beta-admins.yml`,
'2to3', 'convert', helmReleaseName, '--release-versions-max', '200', '--ignore-already-migrated', '--dry-run'
], {
cwd: 'peachjar-aloha/',
env: Object.assign({}, env, {
AWS_ACCESS_KEY_ID: awsAccessKeyId,
AWS_SECRET_ACCESS_KEY: awsSecretAccessKey,
}),
});
yield exec('helm', ['--kubeconfig', `../kilauea/kubefiles/${environment}/kubectl_configs/${environment}-kube-config-beta-admins.yml`, 'ls'], {
cwd: 'peachjar-aloha/',
env: Object.assign({}, env, {
AWS_ACCESS_KEY_ID: awsAccessKeyId,
AWS_SECRET_ACCESS_KEY: awsSecretAccessKey,
}),
});
yield exec('helm', ['--kubeconfig', `../kilauea/kubefiles/${environment}/kubectl_configs/${environment}-kube-config-beta-admins.yml`, 'ls']);
core.info('Migration to helm3 succeeded');
yield exec('helm', [
'--kubeconfig',
Expand Down
14 changes: 11 additions & 3 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,24 @@ export default async function run(

core.info('Starting migration to helm v3')

await exec('helm', [
'--kubeconfig', `../kilauea/kubefiles/${environment}/kubectl_configs/${environment}-kube-config-beta-admins.yml`,
await exec('helm', ['--kubeconfig', `../kilauea/kubefiles/${environment}/kubectl_configs/${environment}-kube-config-beta-admins.yml`,
'2to3','convert', helmReleaseName, '--release-versions-max', '200','--ignore-already-migrated', '--dry-run'
], {
cwd: 'peachjar-aloha/',
env: Object.assign({}, env, {
AWS_ACCESS_KEY_ID: awsAccessKeyId,
AWS_SECRET_ACCESS_KEY: awsSecretAccessKey,
}),
})
await exec('helm', ['--kubeconfig', `../kilauea/kubefiles/${environment}/kubectl_configs/${environment}-kube-config-beta-admins.yml`, 'ls'])
await exec('helm', ['--kubeconfig', `../kilauea/kubefiles/${environment}/kubectl_configs/${environment}-kube-config-beta-admins.yml`, 'ls'],
{
cwd: 'peachjar-aloha/',
env: Object.assign({}, env, {
AWS_ACCESS_KEY_ID: awsAccessKeyId,
AWS_SECRET_ACCESS_KEY: awsSecretAccessKey,
}),
}
)

core.info('Migration to helm3 succeeded')

Expand Down

0 comments on commit be31a15

Please sign in to comment.