我试图在Azure DevOps上为我的项目构建CI / CD管道。我曾经成功了一段时间,但现在我发现我的dev
分支的代码推送两次启动了构建管道,一次在master
管道中,一次在dev
管道中,我也我的应用中心有两个版本。我尝试在Azure DevOps的“ trigers”页面中检查触发器和所有触发器,但这没有任何帮助。外面有人可以帮助我吗?谢谢。
以下是我的YAML配置文件:
trigger:
- master
pool:
vmImage: 'macos-latest'
steps:
- task: Gradle@2
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
publishJUnitResults: false
tasks: 'assembleRelease'
- task: AndroidSigning@3
inputs:
apkFiles: '**/*.apk'
apksignerKeystoreFile: 'key store file'
apksignerKeystorePassword: '$(keyPassword)'
apksignerKeystoreAlias: 'alias'
apksignerKeyPassword: '$(keyPassword)'
- task: CopyFiles@2
inputs:
SourceFolder: '$(Agent.BuildDirectory)'
Contents: '**/*.apk'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'artifact'
publishLocation: 'Container'
- task: AppCenterDistribute@3
inputs:
serverEndpoint: 'VSAC'
appSlug: 'app slug'
appFile: '**/*.apk'
symbolsOption: 'Android'
releaseNotesOption: 'input'
releaseNotesInput: 'CICD Release Build'
destinationType: 'groups'
distributionGroupId: 'dist group id'
trigger:
- dev
pool:
vmImage: 'macos-latest'
steps:
- task: Gradle@2
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
publishJUnitResults: false
tasks: 'assembleRelease'
- task: AndroidSigning@3
inputs:
apkFiles: '**/*.apk'
apksignerKeystoreFile: 'key store file'
apksignerKeystorePassword: '$(keyPassword)'
apksignerKeystoreAlias: 'alias'
apksignerKeyPassword: '$(keyPassword)'
- task: CopyFiles@2
inputs:
SourceFolder: '$(Agent.BuildDirectory)'
Contents: '**/*.apk'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'artifact'
publishLocation: 'Container'
- task: AppCenterDistribute@3
inputs:
serverEndpoint: 'VSAC'
appSlug: 'app slug'
appFile: '**/*.apk'
symbolsOption: 'Android'
releaseNotesOption: 'input'
releaseNotesInput: 'CICD Release Build'
destinationType: 'groups'
distributionGroupId: 'dist group id'