<?xml version='1.0' encoding='UTF-8'?>
<flow-definition plugin="workflow-job">
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties>
    <hudson.plugins.buildblocker.BuildBlockerProperty plugin="build-blocker-plugin">
      <useBuildBlocker>true</useBuildBlocker>
      <blockLevel>GLOBAL</blockLevel>
      <scanQueueFor>DISABLED</scanQueueFor>
      <blockingJobs>gateway-@SERVICE@-pipeline</blockingJobs>
    </hudson.plugins.buildblocker.BuildBlockerProperty>
    <com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty plugin="build-failure-analyzer">
      <doNotScan>false</doNotScan>
    </com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty>
    <com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github">
      <projectUrl>https://github.com/theorchard/gateway-@SERVICE@/</projectUrl>
      <displayName>gateway-@SERVICE@</displayName>
    </com.coravy.hudson.plugins.github.GithubProjectProperty>
    <hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="throttle-concurrents">
      <maxConcurrentPerNode>0</maxConcurrentPerNode>
      <maxConcurrentTotal>0</maxConcurrentTotal>
      <categories class="java.util.concurrent.CopyOnWriteArrayList"/>
      <throttleEnabled>false</throttleEnabled>
      <throttleOption>project</throttleOption>
      <limitOneJobWithMatchingParams>false</limitOneJobWithMatchingParams>
      <paramsToUseForLimit></paramsToUseForLimit>
    </hudson.plugins.throttleconcurrents.ThrottleJobProperty>
    <org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
      <triggers>
        <com.github.kostyasha.github.integration.branch.GitHubBranchTrigger plugin="github-pullrequest">
          <spec></spec>
          <triggerMode>HEAVY_HOOKS</triggerMode>
          <cancelQueued>false</cancelQueued>
          <abortRunning>false</abortRunning>
          <skipFirstRun>false</skipFirstRun>
          <repoProviders>
            <com.github.kostyasha.github.integration.generic.repoprovider.GitHubPluginRepoProvider>
              <cacheConnection>true</cacheConnection>
              <manageHooks>true</manageHooks>
              <repoPermission>ADMIN</repoPermission>
            </com.github.kostyasha.github.integration.generic.repoprovider.GitHubPluginRepoProvider>
          </repoProviders>
          <errorsAction>
            <description>GitHub Branches Trigger Errors</description>
            <errors class="java.util.Collections$SynchronizedSet" serialization="custom">
              <java.util.Collections_-SynchronizedCollection>
                <default>
                  <c class="set"/>
                  <mutex class="java.util.Collections$SynchronizedSet" reference="../../.."/>
                </default>
              </java.util.Collections_-SynchronizedCollection>
            </errors>
          </errorsAction>
          <preStatus>false</preStatus>
        </com.github.kostyasha.github.integration.branch.GitHubBranchTrigger>
        <com.cloudbees.jenkins.GitHubPushTrigger plugin="github">
          <spec></spec>
        </com.cloudbees.jenkins.GitHubPushTrigger>
      </triggers>
    </org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
  </properties>
  <definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps">
    <script>node() {
    stage(&apos;Get Git Commit&apos;) {
        checkout([$class: &apos;GitSCM&apos;, branches: [[name: &apos;*/master&apos;]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: &apos;@GITHUB_CREDENTIAL_ID@&apos;, url: &apos;git@github.com:theorchard/gateway-@SERVICE@.git&apos;]]])
        GIT_COMMIT = sh(returnStdout: true, script: &apos;git rev-parse HEAD&apos;).trim()
    }
    stage(&apos;Unit tests and Style Checks&apos;) {
        build job: &apos;gateway-@SERVICE@-unit-lint&apos;, parameters: [[$class: &apos;StringParameterValue&apos;, name: &apos;GIT_COMMIT&apos;, value: GIT_COMMIT]]
    }
    stage(&apos;Create a release&apos;) {
        build job: &apos;gateway-@SERVICE@-docker-to-ecr&apos;, parameters: [[$class: &apos;StringParameterValue&apos;, name: &apos;GIT_COMMIT&apos;, value: GIT_COMMIT]]
    }
    stage(&apos;Deploying to QA&apos;) {
        build job: &apos;gateway-@SERVICE@-docker-fargate-deploy&apos;, parameters: [[$class: &apos;StringParameterValue&apos;, name: &apos;GIT_COMMIT&apos;, value: GIT_COMMIT],
            [$class: &apos;StringParameterValue&apos;, name: &apos;ENV&apos;, value: &quot;qa&quot;]]
    }
    stage(&apos;Deploy to Prod&apos;) {
        echo &quot;Deploying to prod... ${GIT_COMMIT}&quot;
        build job: &apos;gateway-@SERVICE@-docker-fargate-deploy&apos;, parameters: [[$class: &apos;StringParameterValue&apos;, name: &apos;GIT_COMMIT&apos;, value: GIT_COMMIT],
            [$class: &apos;StringParameterValue&apos;, name: &apos;ENV&apos;, value: &quot;prod&quot;]]
    }
}
</script>
    <sandbox>true</sandbox>
  </definition>
  <triggers/>
  <disabled>false</disabled>
</flow-definition>
