<?xml version='1.1' encoding='UTF-8'?>
<flow-definition plugin="workflow-job">
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties>
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
        <daysToKeep>30</daysToKeep>
        <numToKeep>20</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
    <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/@REPO_NAME@/</projectUrl>
      <displayName></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>
        <org.jenkinsci.plugins.ghprb.GhprbTrigger plugin="ghprb">
          <spec></spec>
          <configVersion>3</configVersion>
          <adminlist></adminlist>
          <allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
          <orgslist>theorchard</orgslist>
          <cron></cron>
          <buildDescTemplate></buildDescTemplate>
          <onlyTriggerPhrase>false</onlyTriggerPhrase>
          <useGitHubHooks>true</useGitHubHooks>
          <permitAll>false</permitAll>
          <whitelist></whitelist>
          <autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
          <displayBuildErrorsOnDownstreamBuilds>false</displayBuildErrorsOnDownstreamBuilds>
          <whiteListTargetBranches>
            <org.jenkinsci.plugins.ghprb.GhprbBranch>
              <branch></branch>
            </org.jenkinsci.plugins.ghprb.GhprbBranch>
          </whiteListTargetBranches>
          <blackListTargetBranches>
            <org.jenkinsci.plugins.ghprb.GhprbBranch>
              <branch></branch>
            </org.jenkinsci.plugins.ghprb.GhprbBranch>
          </blackListTargetBranches>
          <gitHubAuthId>@GITHUB_WEBHOOK_TOKEN_ID@</gitHubAuthId>
          <triggerPhrase>retest this please</triggerPhrase>
          <skipBuildPhrase>.*\[skip\W+ci\].*</skipBuildPhrase>
          <blackListCommitAuthor></blackListCommitAuthor>
          <blackListLabels></blackListLabels>
          <whiteListLabels></whiteListLabels>
          <includedRegions></includedRegions>
          <excludedRegions></excludedRegions>
          <extensions>
            <org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
              <commitStatusContext></commitStatusContext>
              <triggeredStatus></triggeredStatus>
              <startedStatus></startedStatus>
              <statusUrl></statusUrl>
              <addTestResults>false</addTestResults>
            </org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
          </extensions>
        </org.jenkinsci.plugins.ghprb.GhprbTrigger>
        <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;) {
        GIT_COMMIT = &quot;${ghprbActualCommit}&quot;
        checkout([$class: &apos;GitSCM&apos;, branches: [[name: &quot;${GIT_COMMIT}&quot;]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: &apos;@GITHUB_CREDENTIAL_ID@&apos;, url: &apos;git@github.com:theorchard/@REPO_NAME@.git&apos;, refspec: &apos;+refs/pull/*:refs/remotes/origin/pr/*&apos;]]])
        MASTER_COMMIT = sh(returnStdout: true, script: &apos;git rev-parse HEAD~1&apos;).trim()
        DIFF_FILES = sh(returnStdout: true, script: &quot;git diff --name-only ${MASTER_COMMIT} ${GIT_COMMIT}&quot;)
        script{
            LAMBDA_DIRS = []
            for (item in DIFF_FILES.split(&apos;\n&apos;)){
                if (item.contains(&apos;/&apos;)){
                    lambda_dir = item.split(&apos;/&apos;)[1]
                    if (!LAMBDA_DIRS.contains(lambda_dir)){
                        LAMBDA_DIRS.add(lambda_dir)
                    }
                }
            }
        }
    }
    stage(&apos;Trigger Pull Request&apos;) {
        checkout([$class: &apos;GitSCM&apos;, branches: [[name: &quot;${GIT_COMMIT}&quot;]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: &apos;@GITHUB_CREDENTIAL_ID@&apos;, url: &apos;git@github.com:theorchard/@REPO_NAME@.git&apos;]]])
        script{
            for (LAMBDA_DIR in LAMBDA_DIRS){
                dir(&quot;lambda/${LAMBDA_DIR}&quot;){
                    sh &quot;make dev&quot;
                    sh &quot;make lint&quot;
                    sh &quot;make test&quot;
                }
            }
        }
    }
}
</script>
    <sandbox>true</sandbox>
  </definition>
  <triggers/>
  <disabled>false</disabled>
</flow-definition>
