From c02e4d315dbd5366bd33916d7b6e04873c660e0e Mon Sep 17 00:00:00 2001 From: Roman Shchukin Date: Tue, 22 Nov 2022 13:44:54 +0100 Subject: [PATCH 1/4] Pipeline fixing --- azure-pipelines-steps-node.yml | 4 +- azure-pipelines-steps-test-build.yml | 4 +- azure-pipelines.yml | 162 +++++++++++---------------- 3 files changed, 71 insertions(+), 99 deletions(-) diff --git a/azure-pipelines-steps-node.yml b/azure-pipelines-steps-node.yml index 8e2591383..bc815e53c 100644 --- a/azure-pipelines-steps-node.yml +++ b/azure-pipelines-steps-node.yml @@ -5,12 +5,12 @@ parameters: steps: # npm install - task: Npm@1 - displayName: (azure-pipelines-task-lib) npm install + displayName: npm install inputs: command: install workingDir: node - task: NodeTool@0 - displayName: (azure-pipelines-task-lib) use node ${{parameters.nodeVersion}} + displayName: use node ${{parameters.nodeVersion}} inputs: versionSpec: ${{parameters.nodeVersion}} diff --git a/azure-pipelines-steps-test-build.yml b/azure-pipelines-steps-test-build.yml index 38ca9e3e9..c4460870d 100644 --- a/azure-pipelines-steps-test-build.yml +++ b/azure-pipelines-steps-test-build.yml @@ -2,9 +2,9 @@ steps: # test - script: node make.js test workingDirectory: node - displayName: (azure-pipelines-task-lib) node make.js test + displayName: node make.js test # build - script: node make.js build - displayName: (azure-pipelines-task-lib) node make.js build + displayName: node make.js build workingDirectory: node diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9bafc145f..cb10806ec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,97 +1,69 @@ trigger: -- master -- features/* -- releases/* - -variables: - nodeVersion: 10.23.0 - -jobs: -################################################# -- job: windows -################################################# - displayName: windows - pool: - vmImage: windows-2019 - - steps: - ################################################################################ - # azure-pipelines-task-lib - ################################################################################ + - master + - features/* + - releases/* - - template: azure-pipelines-steps-node.yml - parameters: - nodeVersion: $(nodeVersion) - - # test - - script: | - chcp 437 - node make.js test - workingDirectory: node - displayName: (azure-pipelines-task-lib) node make.js test - - # build - - script: | - chcp 437 - node make.js build - displayName: (azure-pipelines-task-lib) node make.js build - workingDirectory: node - - ################################################################################ - # VstsTaskSdk - ################################################################################ - - # npm install - - task: Npm@1 - displayName: (VstsTaskSdk) npm install - inputs: - command: install - workingDir: powershell - - # npm test - - script: npm test - displayName: (VstsTaskSdk) npm test - workingDirectory: powershell - -################################################# -- job: linux -################################################# - displayName: Linux - pool: - vmImage: ubuntu-18.04 - - steps: - - template: azure-pipelines-steps-node.yml - parameters: - nodeVersion: $(nodeVersion) - - template: azure-pipelines-steps-test-build.yml - - - task: PublishPipelineArtifact@1 - inputs: - targetPath: 'node/_build' - artifactType: 'pipeline' - artifactName: 'npm-package' - - # For CI runs on master, automatically publish packages - - bash: | - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc - cd _build - npm publish || true # Ignore publish failures, usually will happen because package already exists - displayName: (azure-pipelines-task-lib) npm publish - workingDirectory: node - condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranchname'], 'master', 'releases/3.x')) - env: - NPM_TOKEN: $(npmPublishToken) - -################################################# -- job: macOS -################################################# - displayName: macOS - pool: - vmImage: macOS-10.15 - - steps: - - template: azure-pipelines-steps-node.yml - parameters: - nodeVersion: $(nodeVersion) - - template: azure-pipelines-steps-test-build.yml + variables: + - group: npm-tokens + - name: nodeVersion + value: '16.13.0' + + jobs: + ################################################# + - job: windows + ################################################# + displayName: windows + pool: + vmImage: windows-2019 + + steps: + - template: azure-pipelines-steps-node.yml + parameters: + nodeVersion: $(nodeVersion) + + - template: azure-pipelines-steps-test-build.yml + + ################################################# + - job: linux + ################################################# + displayName: Linux + pool: + vmImage: ubuntu-18.04 + + steps: + - template: azure-pipelines-steps-node.yml + parameters: + nodeVersion: $(nodeVersion) + + - template: azure-pipelines-steps-test-build.yml + + - task: PublishPipelineArtifact@1 + inputs: + targetPath: 'node/_build' + artifactType: 'pipeline' + artifactName: 'npm-package' + + # For CI runs on master, automatically publish packages + - bash: | + echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc + npm publish || true # Ignore publish failures, usually will happen because package already exists + displayName: npm publish + workingDirectory: node/_build + condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranch'], 'refs/heads/master')) + env: + NPM_TOKEN: $(npm-automation.token) + + ################################################# + - job: macOS + ################################################# + displayName: macOS + pool: + vmImage: macOS-10.15 + + steps: + - template: azure-pipelines-steps-node.yml + parameters: + nodeVersion: $(nodeVersion) + + - template: azure-pipelines-steps-test-build.yml + \ No newline at end of file From 8d96fa1b52d7a50dddd890ef3a9ddaa3a8d55655 Mon Sep 17 00:00:00 2001 From: Roman Shchukin Date: Thu, 24 Nov 2022 09:26:17 +0100 Subject: [PATCH 2/4] Indentation fix --- azure-pipelines.yml | 129 ++++++++++++++++++++++---------------------- 1 file changed, 64 insertions(+), 65 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cb10806ec..b9d0f3e76 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,69 +1,68 @@ trigger: - - master - - features/* - - releases/* +- master +- features/* +- releases/* - variables: - - group: npm-tokens - - name: nodeVersion - value: '16.13.0' +variables: +- group: npm-tokens +- name: nodeVersion + value: '16.13.0' - jobs: - ################################################# - - job: windows - ################################################# - displayName: windows - pool: - vmImage: windows-2019 +jobs: +################################################# +- job: windows +################################################# + displayName: windows + pool: + vmImage: windows-2019 + + steps: + - template: azure-pipelines-steps-node.yml + parameters: + nodeVersion: $(nodeVersion) + + - template: azure-pipelines-steps-test-build.yml - steps: - - template: azure-pipelines-steps-node.yml - parameters: - nodeVersion: $(nodeVersion) - - - template: azure-pipelines-steps-test-build.yml - - ################################################# - - job: linux - ################################################# - displayName: Linux - pool: - vmImage: ubuntu-18.04 - - steps: - - template: azure-pipelines-steps-node.yml - parameters: - nodeVersion: $(nodeVersion) - - - template: azure-pipelines-steps-test-build.yml - - - task: PublishPipelineArtifact@1 - inputs: - targetPath: 'node/_build' - artifactType: 'pipeline' - artifactName: 'npm-package' - - # For CI runs on master, automatically publish packages - - bash: | - echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc - npm publish || true # Ignore publish failures, usually will happen because package already exists - displayName: npm publish - workingDirectory: node/_build - condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranch'], 'refs/heads/master')) - env: - NPM_TOKEN: $(npm-automation.token) - - ################################################# - - job: macOS - ################################################# - displayName: macOS - pool: - vmImage: macOS-10.15 - - steps: - - template: azure-pipelines-steps-node.yml - parameters: - nodeVersion: $(nodeVersion) - - - template: azure-pipelines-steps-test-build.yml - \ No newline at end of file +################################################# +- job: linux +################################################# + displayName: Linux + pool: + vmImage: ubuntu-18.04 + + steps: + - template: azure-pipelines-steps-node.yml + parameters: + nodeVersion: $(nodeVersion) + + - template: azure-pipelines-steps-test-build.yml + + - task: PublishPipelineArtifact@1 + inputs: + targetPath: 'node/_build' + artifactType: 'pipeline' + artifactName: 'npm-package' + + # For CI runs on master, automatically publish packages + - bash: | + echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc + npm publish || true # Ignore publish failures, usually will happen because package already exists + displayName: npm publish + workingDirectory: node/_build + condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranch'], 'refs/heads/master')) + env: + NPM_TOKEN: $(npm-automation.token) + +################################################# +- job: macOS +################################################# + displayName: macOS + pool: + vmImage: macOS-10.15 + + steps: + - template: azure-pipelines-steps-node.yml + parameters: + nodeVersion: $(nodeVersion) + + - template: azure-pipelines-steps-test-build.yml \ No newline at end of file From 6f4ca1d0a8e66cdfce5892549624608544bf9a95 Mon Sep 17 00:00:00 2001 From: Roman Shchukin Date: Thu, 24 Nov 2022 09:56:46 +0100 Subject: [PATCH 3/4] Formating --- azure-pipelines-steps-node.yml | 18 +++++++++--------- azure-pipelines-steps-test-build.yml | 12 ++++++------ azure-pipelines.yml | 7 ++----- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/azure-pipelines-steps-node.yml b/azure-pipelines-steps-node.yml index bc815e53c..a7444bfb8 100644 --- a/azure-pipelines-steps-node.yml +++ b/azure-pipelines-steps-node.yml @@ -4,13 +4,13 @@ parameters: steps: # npm install - - task: Npm@1 - displayName: npm install - inputs: - command: install - workingDir: node +- task: Npm@1 + displayName: npm install + inputs: + command: install + workingDir: node - - task: NodeTool@0 - displayName: use node ${{parameters.nodeVersion}} - inputs: - versionSpec: ${{parameters.nodeVersion}} +- task: NodeTool@0 + displayName: use node ${{parameters.nodeVersion}} + inputs: + versionSpec: ${{parameters.nodeVersion}} diff --git a/azure-pipelines-steps-test-build.yml b/azure-pipelines-steps-test-build.yml index c4460870d..0789bb88a 100644 --- a/azure-pipelines-steps-test-build.yml +++ b/azure-pipelines-steps-test-build.yml @@ -1,10 +1,10 @@ steps: # test - - script: node make.js test - workingDirectory: node - displayName: node make.js test +- script: node make.js test + workingDirectory: node + displayName: node make.js test # build - - script: node make.js build - displayName: node make.js build - workingDirectory: node +- script: node make.js build + displayName: node make.js build + workingDirectory: node diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b9d0f3e76..01aa33fe3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,7 +2,7 @@ trigger: - master - features/* - releases/* - + variables: - group: npm-tokens - name: nodeVersion @@ -20,7 +20,6 @@ jobs: - template: azure-pipelines-steps-node.yml parameters: nodeVersion: $(nodeVersion) - - template: azure-pipelines-steps-test-build.yml ################################################# @@ -34,7 +33,6 @@ jobs: - template: azure-pipelines-steps-node.yml parameters: nodeVersion: $(nodeVersion) - - template: azure-pipelines-steps-test-build.yml - task: PublishPipelineArtifact@1 @@ -43,7 +41,7 @@ jobs: artifactType: 'pipeline' artifactName: 'npm-package' - # For CI runs on master, automatically publish packages + # For CI runs on master, automatically publish packages - bash: | echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc npm publish || true # Ignore publish failures, usually will happen because package already exists @@ -64,5 +62,4 @@ jobs: - template: azure-pipelines-steps-node.yml parameters: nodeVersion: $(nodeVersion) - - template: azure-pipelines-steps-test-build.yml \ No newline at end of file From 1b8ce19aa80738a3f330e06572eda79d5e2fd0e9 Mon Sep 17 00:00:00 2001 From: Roman Shchukin Date: Thu, 24 Nov 2022 10:03:36 +0100 Subject: [PATCH 4/4] Node version was reverted --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 01aa33fe3..42914e225 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,7 @@ trigger: variables: - group: npm-tokens - name: nodeVersion - value: '16.13.0' + value: '10.23.0' jobs: #################################################