Skip to content

Commit

Permalink
chore: update workflowNodeVersion to lts/* (#636)
Browse files Browse the repository at this point in the history
Currently `upgrade-configuration` workflows are failing for `cdk8s-cli`: https://github.com/cdk8s-team/cdk8s-cli/actions/runs/6998871953.

This is due to us editing the workflow file and adding `lts/*` based on step number. This step number changes if we have `workflow bootstrap steps`, which would [precede](https://github.com/projen/projen/blob/da981a3e2651344ef2cc342708e67c75c0433c02/src/javascript/node-project.ts#L974C9-L974C9) node step. This results in us editing the file at the incorrect spot and lead to an incorrect workflow yaml file. 

Instead of editing the workflow file and relying on the step number to be correct, I am instead adding this to `workflowNodeVersion` property of projen projects.
  • Loading branch information
vinayak-kukreja authored Nov 29, 2023
1 parent faf97ab commit e3233e0
Show file tree
Hide file tree
Showing 9 changed files with 254 additions and 255 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .github/workflows/release.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/upgrade-compiler-dependencies-main.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/upgrade-dev-dependencies-main.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/upgrade-runtime-dependencies-main.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/projects/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function buildNodeProjectDefaultOptions(options: Cdk8sTeamNodeProjectOpti
// if release is enabled, default to releasing to npm as well
releaseToNpm: options.release,
minNodeVersion: '16.20.0',
workflowNodeVersion: '18.17.0',
workflowNodeVersion: 'lts/*',
depsUpgradeOptions,
};
}
Expand Down Expand Up @@ -236,7 +236,7 @@ export function addComponents(project: NodeProject, repoName: string, branches?:
configDeps.push('@cdk8s/projen-common');
}

const configUpgrade = new UpgradeDependencies(project, {
new UpgradeDependencies(project, {
include: configDeps,
taskName: 'upgrade-configuration',
pullRequestTitle: 'upgrade configuration',
Expand All @@ -246,7 +246,6 @@ export function addComponents(project: NodeProject, repoName: string, branches?:
schedule: UpgradeDependenciesSchedule.expressions([UPGRADE_CONFIGURATION_SCHEDULE]),
},
});
configUpgrade.workflows.forEach(wf => wf.file?.addOverride('jobs.upgrade.steps.1.with.node-version', 'lts/*'));

new UpgradeDependencies(project, {
exclude: [...configDeps, ...(compilerDeps ?? [])],
Expand Down
Loading

0 comments on commit e3233e0

Please sign in to comment.