Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #82 from alphagov/yarn-install
Browse files Browse the repository at this point in the history
Detect and install yarn dependencies automatically
  • Loading branch information
kevindew authored Jan 18, 2021
2 parents 70d2bce + acd2eab commit 3fcd26f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ postgres96Lint | Whether or not to forbid newer postgres features | `true`
publishingE2ETests | Whether or not to run the Publishing end-to-end tests. | `false`
sassLint | Whether or not to run the SASS linter | `true`
skipDeployToIntegration | Whether or not to skip the "Deploy to integration" stage | `false`
yarnInstall | Whether or not to install Yarn dependencies if a yarn.lock file is found | `true`
6 changes: 6 additions & 0 deletions vars/govuk.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ def nonDockerBuildTasks(options, jobName, repoName) {
}
}

if (options.yarnInstall != false && fileExists(file: "yarn.lock")) {
stage("yarn install") {
sh("yarn install --frozen-lockfile")
}
}

if (hasAssets() && hasSCSSLint() && options.sassLint != false) {
stage("Lint SCSS") {
lintSCSS()
Expand Down

0 comments on commit 3fcd26f

Please sign in to comment.