pr: none trigger: none # Customize build number to include major version # Example: tools_20201022.1 name: "tools_${{ iif(parameters.dryRun, 'dryrun_', '') }}$(Date:yyyyMMdd)$(Rev:.r)" parameters: - name: dryRun displayName: Dry Run Mode type: boolean default: false variables: - group: 'Github and NPM secrets' - template: .devops/templates/variables.yml resources: repositories: - repository: 1esPipelines type: git name: 1ESPipelineTemplates/1ESPipelineTemplates ref: refs/tags/release extends: template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines parameters: pool: name: Azure-Pipelines-1ESPT-ExDShared image: windows-latest os: windows # We need windows because compliance task only run on windows. stages: - stage: main jobs: - job: Release pool: name: '1ES-Host-Ubuntu' image: '1ES-PT-Ubuntu-20.04' os: linux timeoutInMinutes: 90 workspace: clean: all templateContext: outputParentDirectory: $(System.DefaultWorkingDirectory) outputs: - output: pipelineArtifact targetPath: $(System.DefaultWorkingDirectory) artifactName: output steps: - template: .devops/templates/tools.yml@self parameters: dryRun: ${{ parameters.dryRun }} - script: | echo "Following packages will be published(if they contain changes):" yarn nx show projects -p 'tag:tools,!tag:npm:private,!tag:v8' --exclude 'apps/**' - script: | FLUENT_PROD_BUILD=true yarn nx run-many -t build -p 'tag:tools,!tag:npm:private,!tag:v8' --exclude 'apps/**' --nxBail displayName: build - script: | FLUENT_PROD_BUILD=true yarn nx run-many -t test -p 'tag:tools,!tag:npm:private,!tag:v8' --exclude 'apps/**' --nxBail displayName: test - script: | FLUENT_PROD_BUILD=true yarn nx run-many -t lint -p 'tag:tools,!tag:npm:private,!tag:v8' --exclude 'apps/**' --nxBail displayName: lint - template: .devops/templates/run-with-token.yml@self parameters: steps: - script: | yarn beachball publish --config scripts/beachball/src/release-tools.config.js --message 'release: applying package updates - tools' env: BEACHBALL_GIT_TOKEN: $(createToken.GITHUB_APP_TOKEN) BEACHBALL_NPM_TOKEN: $(npmToken) displayName: Publish changes and bump versions condition: and(succeeded(), not(${{ parameters.dryRun }}))