<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description>Builds and deploys version of mobile-@APP_NAME@ bundle to CDN.</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>
    <com.chikli.hudson.plugin.naginator.NaginatorOptOutProperty plugin="naginator">
      <optOut>false</optOut>
    </com.chikli.hudson.plugin.naginator.NaginatorOptOutProperty>
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <hudson.model.StringParameterDefinition>
          <name>GIT_COMMIT</name>
          <description>Commit version to checkout and build bundle to.</description>
          <defaultValue></defaultValue>
        </hudson.model.StringParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>EXP_USER</name>
          <description>Username for Expo</description>
          <defaultValue>@EXP_USERNAME@</defaultValue>
        </hudson.model.StringParameterDefinition>
        <hudson.model.PasswordParameterDefinition>
          <name>EXP_PASSWORD</name>
          <description>Password for Expo User</description>
          <defaultValue>@EXP_PASSWORD@</defaultValue>
        </hudson.model.PasswordParameterDefinition>
      </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>
  <scm class="hudson.plugins.git.GitSCM" plugin="git">
    <configVersion>2</configVersion>
    <userRemoteConfigs>
      <hudson.plugins.git.UserRemoteConfig>
        <url>git@github.com:theorchard/mobile-@APP_NAME@.git</url>
        <credentialsId>@GITHUB_CREDENTIAL_ID@</credentialsId>
      </hudson.plugins.git.UserRemoteConfig>
    </userRemoteConfigs>
    <branches>
      <hudson.plugins.git.BranchSpec>
        <name>${GIT_COMMIT}</name>
      </hudson.plugins.git.BranchSpec>
    </branches>
    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
    <submoduleCfg class="list"/>
    <extensions>
      <hudson.plugins.git.extensions.impl.AuthorInChangelog/>
    </extensions>
  </scm>
  <assignedNode>@ALLOWED_NODE@</assignedNode> 
  <canRoam>false</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.Shell>
      <command>#!/bin/sh -ex
echo $GIT_COMMIT
export DEPLOY_TIMESTAMP=${GIT_COMMIT}
export TIMESTAMP=${GIT_COMMIT}

jobStartTime=$(date +%s)
echo $(date -d @$jobStartTime +&quot;Job started at: %Y-%m-%d %H:%M:%S&quot;)

# Check yarn version and run. 
node --version
yarn --version
yarn --frozen-lockfile
yarn deploy

jobEndTime=$(date +%s)
echo $(date -d @$jobEndTime +&quot;Job finished at: %Y-%m-%d %H:%M:%S&quot;)
elapsedSeconds=$(($jobEndTime - $jobStartTime))
printf &quot;Job duration: %d minutes %d seconds\n&quot; $(($elapsedSeconds/60)) $(($elapsedSeconds%60))
</command>
    </hudson.tasks.Shell>
  </builders>
  <publishers>
    <jenkins.plugins.slack.SlackNotifier plugin="slack">
      <baseUrl></baseUrl>
      <teamDomain>orcd</teamDomain>
      <authToken></authToken>
      <authTokenCredentialId>@SLACK_CREDENTIAL_ID@</authTokenCredentialId>
      <botUser>false</botUser>
      <room>@SLACK_ROOMS@</room>
      <startNotification>false</startNotification>
      <notifySuccess>false</notifySuccess>
      <notifyAborted>false</notifyAborted>
      <notifyNotBuilt>true</notifyNotBuilt>
      <notifyUnstable>true</notifyUnstable>
      <notifyRegression>false</notifyRegression>
      <notifyFailure>true</notifyFailure>
      <notifyBackToNormal>true</notifyBackToNormal>
      <notifyRepeatedFailure>false</notifyRepeatedFailure>
      <includeTestSummary>false</includeTestSummary>
      <includeFailedTests>false</includeFailedTests>
      <commitInfoChoice>AUTHORS_AND_TITLES</commitInfoChoice>
      <includeCustomMessage>false</includeCustomMessage>
      <customMessage>Commit Sha $GIT_COMMIT deployed</customMessage>
    </jenkins.plugins.slack.SlackNotifier>
  </publishers>
  <buildWrappers>
    <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup">
      <deleteDirs>false</deleteDirs>
      <cleanupParameter></cleanupParameter>
      <externalDelete></externalDelete>
    </hudson.plugins.ws__cleanup.PreBuildCleanup>
    <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper"/>
    <hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="ansicolor">
      <colorMapName>xterm</colorMapName>
    </hudson.plugins.ansicolor.AnsiColorBuildWrapper>
    <jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper plugin="nodejs">
    <nodeJSInstallationName>nodejs @NODE_VERSION@</nodeJSInstallationName>
    </jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper>
  </buildWrappers>
</project>
