<?xml version='1.1' encoding='UTF-8'?>
<flow-definition plugin="workflow-job">
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties>
    <hudson.plugins.buildblocker.BuildBlockerProperty plugin="build-blocker-plugin">
      <useBuildBlocker>false</useBuildBlocker>
      <blockLevel>GLOBAL</blockLevel>
      <scanQueueFor>DISABLED</scanQueueFor>
      <blockingJobs></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>
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <hudson.model.StringParameterDefinition>
          <name>GIT_COMMIT</name>
          <description>git commit sha</description>
          <defaultValue></defaultValue>
          <trim>false</trim>
        </hudson.model.StringParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>LAMBDA_DIR</name>
          <description>lambda directory to deploy</description>
          <defaultValue></defaultValue>
          <trim>false</trim>
        </hudson.model.StringParameterDefinition>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
    <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>
  </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/@REPO_NAME@.git&apos;]]])
        GIT_COMMIT = sh(returnStdout: true, script: &apos;git rev-parse HEAD&apos;).trim()
        script{
            currentBuild.description = LAMBDA_DIR
        }
    }
    stage (&apos;Unit Tests &amp; Lint&apos;){
        build job: &apos;@REPO_NAME@-unit-lint&apos;, parameters: [string(name: &apos;GIT_COMMIT&apos;, value: GIT_COMMIT), string(name: &apos;LAMBDA_DIR&apos;, value: LAMBDA_DIR)]
    }
     stage (&apos;Sonar Scan and Analysis&apos;){
        build job: &apos;@REPO_NAME@-sonar-scan&apos;, parameters: [string(name: &apos;GIT_COMMIT&apos;, value: GIT_COMMIT), string(name: &apos;LAMBDA_DIR&apos;, value: LAMBDA_DIR)]
    }
    stage (&apos;Deploy to QA&apos;){
        build job: &apos;@REPO_NAME@-deploy&apos;, parameters: [string(name: &apos;GIT_COMMIT&apos;, value: GIT_COMMIT), string(name: &apos;LAMBDA_DIR&apos;, value: LAMBDA_DIR), string(name: &apos;ENV&apos;, value: &apos;qa&apos;)]
    }
    stage(&apos;Integration Tests&apos;){
        build job: &apos;@REPO_NAME@-integration-tests&apos;, parameters: [string(name: &apos;GIT_COMMIT&apos;, value: GIT_COMMIT), string(name: &apos;LAMBDA_DIR&apos;, value: LAMBDA_DIR)]
    }
    stage(&apos;Deploy to Prod&apos;){
        build job: &apos;@REPO_NAME@-deploy&apos;, parameters: [string(name: &apos;GIT_COMMIT&apos;, value: GIT_COMMIT), string(name: &apos;LAMBDA_DIR&apos;, value: LAMBDA_DIR), string(name: &apos;ENV&apos;, value: &apos;prod&apos;)]
    }
}</script>
    <sandbox>true</sandbox>
  </definition>
  <triggers/>
  <disabled>false</disabled>
</flow-definition>
