Синтаксис YAML azure -pipelines.yml для добавления подписки azure для всех шагов - PullRequest
0 голосов
/ 07 апреля 2020

Мне нужно добавить azureSubscription: 'AWSMavenReadOnly' «глобально» для всех шагов. Я пытаюсь избежать полного синтаксиса task. Как бы я добавил это в качестве входных данных для всех этих сценариев?

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
  vmImage: 'ubuntu-latest'
steps:
- script: sbt clean
  displayName: 'Running $ sbt clean'
- script: sbt update
  displayName: 'Running $ sbt update'
- script: sbt compile
  displayName: 'Running $ sbt compile'
- script: sbt test
  displayName: 'Running $ sbt test'

1 Ответ

1 голос
/ 07 апреля 2020

У меня вроде как получилось:

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
  vmImage: 'ubuntu-latest'
steps:
- task: AWSShellScript@1
  inputs:
    awsCredentials: 'AWSMavenReadOnly'
    regionName: 'eu-central-1'
    scriptType: 'inline'
    inlineScript: 'sbt clean update compile'
  displayName: 'Running $ sbt clean update compile'
- task: AWSShellScript@1
  inputs:
    awsCredentials: 'AWSMavenReadOnly'
    regionName: 'eu-central-1'
    scriptType: 'inline'
    inlineScript: 'sbt test'
  displayName: 'Running $ sbt test'

Теперь мне нужно выяснить, как использовать java11 вместо jre по умолчанию, доступного на ubuntu-latest

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...