spec:
  stages:
     - displayName: Init
       steps:
          - name: slackSendNotification
            conditions:
              - configKey: 'channel'
     - displayName: Pull-Request Voting
       steps:
          - name: sonarExecuteScan
            conditions:
              - filePattern: '**/sonar-project.properties'
          - name: mavenExecuteIntegration
            conditions:
              - filePattern: 'integration-tests/pom.xml'
          - name: npmExecuteScripts
            conditions:
              - configKey: 'runScripts'
     - displayName: Build
       steps:
          - name: sonarExecuteScan
            conditions:
              - filePattern: '**/sonar-project.properties'
     - displayName: Additional Unit Tests
       steps:
          - name: batsExecuteTests
            conditions:
              - filePattern: '**/*.bats'
          - name: karmaExecuteTests
            conditions:
              - filePattern: '**/karma.conf.js'
          - name: npmExecuteScripts
            conditions:
              - configKey: 'runScripts'
     - displayName: Integration
       steps:
          - name: npmExecuteScripts
            conditions:
              - configKey: 'runScripts'
          - name: mavenExecuteIntegration
            conditions:
              - filePattern: 'integration-tests/pom.xml'
     - displayName: Acceptance
       steps:
          - name: multicloudDeploy
            conditions:
              - configKey: 'cfTargets'
              - configKey: 'neoTargets'
          - name: cloudFoundryDeploy
            conditions:
              - configKey: 'cfSpace'
              - configKey: 'cloudFoundry/space'
          - name: healthExecuteCheck
            conditions:
              - configKey: 'testServerUrl'
          - name: newmanExecute
            conditions:
              - filePatternFromConfig: 'newmanCollection'
              - configKey: 'testRepository'
          - name: uiVeri5ExecuteTests
            conditions:
              - filePattern: '**/conf.js'
              - configKey: 'testRepository'
          - name: npmExecuteEndToEndTests
            conditions:
              - configKey: 'appUrls'
     - displayName: Security
       steps:
          - name: checkmarxExecuteScan
            conditions:
              - configKey: 'checkmarxCredentialsId'
          - name: fortifyExecuteScan
            conditions:
              - configKey: 'fortifyCredentialsId'
          - name: whitesourceExecuteScan
            conditions:
              - configKey: 'userTokenCredentialsId'
              - configKey: 'whitesource/userTokenCredentialsId'
              - configKey: 'whitesourceUserTokenCredentialsId'
     - displayName: Performance
       steps:
          - name: multicloudDeploy
            conditions:
              - configKey: 'cfTargets'
              - configKey: 'neoTargets'
          - name: gatlingExecuteTests
            conditions:
              - filePatternFromConfig: 'pomPath'
              - configKey: 'appUrls'
     - displayName: Compliance
     - displayName: Promote
       steps:
          - name: containerPushToRegistry
            conditions:
              - configKey: 'dockerRegistryUrl'
          - name: nexusUpload
            conditions:
              - configKey: 'url'
     - displayName: Release
       steps:
          - name: multicloudDeploy
            conditions:
              - configKey: 'cfTargets'
              - configKey: 'neoTargets'
          - name: cloudFoundryDeploy
            conditions:
              - configKey: 'cfSpace'
              - configKey: 'cloudFoundry/space'
          - name: neoDeploy
            conditions:
              - configKey: 'neo/account'
          - name: tmsUpload
            conditions:
              - configKey: nodeName
          - name: healthExecuteCheck
            conditions:
              - configKey: 'testServerUrl'
          - name: npmExecuteEndToEndTests
            conditions:
              - configKey: 'appUrls'
          - name: githubPublishRelease
            conditions:
              - configKey: 'githubTokenCredentialsId'
     - displayName: Post Actions
       steps:
          - name: slackSendNotification
            conditions:
              - configKey: 'channel'
