From c5e8d31bd53f0137ddff025b1f98cd8d86d92efb Mon Sep 17 00:00:00 2001 From: Jeff Fisher Date: Thu, 19 Dec 2024 17:00:51 -0600 Subject: [PATCH] [engsys] inline eslint step into analyze template (#32304) ### Packages impacted by this PR None directly, this only touches CI. ### Describe the problem that is addressed by this PR We were seeing odd behavior in CI where the `rush install` inside of the lint step was failing, but since this task was only ever called from analyze, which has already executed `rush install` it seemed unnecessary. This change inlines the behavior from the run-estlint step and avoids the duplicate `rush install` call. --- eng/pipelines/templates/steps/analyze.yml | 7 ++++--- eng/pipelines/templates/steps/run-eslint.yml | 12 ------------ 2 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 eng/pipelines/templates/steps/run-eslint.yml diff --git a/eng/pipelines/templates/steps/analyze.yml b/eng/pipelines/templates/steps/analyze.yml index 6488bdb59320..8861e4fe3542 100644 --- a/eng/pipelines/templates/steps/analyze.yml +++ b/eng/pipelines/templates/steps/analyze.yml @@ -68,9 +68,10 @@ steps: node eng/tools/rush-runner/index.js build $(ChangedServices) -packages "$(ArtifactPackageNames)" --verbose -p max displayName: "Build libraries" - - template: /eng/pipelines/templates/steps/run-eslint.yml - parameters: - ServiceDirectories: $(ChangedServices) + - pwsh: | + node common/scripts/install-run-rush.js build -t @azure/eslint-plugin-azure-sdk -t @azure/monitor-opentelemetry-exporter + node eng/tools/rush-runner/index.js lint "$(ChangedServices)" -p max + displayName: "Build ESLint Plugin and Lint Libraries" - pwsh: | node eng/tools/rush-runner/index.js check-format $(ChangedServices) -packages "$(ArtifactPackageNames)" --verbose diff --git a/eng/pipelines/templates/steps/run-eslint.yml b/eng/pipelines/templates/steps/run-eslint.yml deleted file mode 100644 index 438daefe35bf..000000000000 --- a/eng/pipelines/templates/steps/run-eslint.yml +++ /dev/null @@ -1,12 +0,0 @@ -parameters: - ServiceDirectories: '' - -steps: - - script: | - node common/scripts/install-run-rush.js install - displayName: "Install library dependencies" - - - pwsh: | - node common/scripts/install-run-rush.js build -t @azure/eslint-plugin-azure-sdk -t @azure/monitor-opentelemetry-exporter - node eng/tools/rush-runner/index.js lint "${{parameters.ServiceDirectories}}" -p max - displayName: "Build ESLint Plugin and Lint Libraries"