<?xml version='1.1' encoding='UTF-8'?>
<project>
  <actions/>
  <description>Deploys ows-@SERVICE@ as a docker image to {Environment}</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>
    <org.datadog.jenkins.plugins.datadog.DatadogJobProperty plugin="datadog">
      <emitOnCheckout>false</emitOnCheckout>
      <tagProperties>environment=${ENV}
deploy=${SERVICE_NAME}
app=ows
commit=${GIT_COMMIT}
      </tagProperties>
    </org.datadog.jenkins.plugins.datadog.DatadogJobProperty>
    <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>Docker image version</description>
          <defaultValue></defaultValue>
          <trim>false</trim>
        </hudson.model.StringParameterDefinition>
        <hudson.model.ChoiceParameterDefinition>
          <name>ENV</name>
          <description>Environment to deploy to.</description>
          <choices class="java.util.Arrays$ArrayList">
            <a class="string-array">
              <string>qa</string>
              <string>prod</string>
            </a>
          </choices>
        </hudson.model.ChoiceParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>SERVICE_NAME</name>
          <description></description>
          <defaultValue>ows-@SERVICE@</defaultValue>
          <trim>false</trim>
        </hudson.model.StringParameterDefinition>
        <hudson.model.ChoiceParameterDefinition>
          <name>AWS_REGION</name>
          <description></description>
          <choices class="java.util.Arrays$ArrayList">
            <a class="string-array">
              <string>us-east-1</string>
              <string>us-west-2</string>
            </a>
          </choices>
        </hudson.model.ChoiceParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>CLUSTER_NAME</name>
          <description></description>
          <defaultValue>${ENV}-${SERVICE_NAME}</defaultValue>
          <trim>false</trim>
        </hudson.model.StringParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>FARGATE_SERVICE_NAME</name>
          <description></description>
          <defaultValue>${ENV}-${SERVICE_NAME}</defaultValue>
          <trim>false</trim>
        </hudson.model.StringParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>TASK_FAMILY</name>
          <description></description>
          <defaultValue>${ENV}-${SERVICE_NAME}</defaultValue>
          <trim>false</trim>
        </hudson.model.StringParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>CONTAINER_NAME</name>
          <description></description>
          <defaultValue>${SERVICE_NAME}</defaultValue>
          <trim>false</trim>
        </hudson.model.StringParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>ECR_REGISTRY_ACCOUNT_ID</name>
          <description></description>
          <defaultValue>086679231553</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>
  <scm class="hudson.plugins.git.GitSCM" plugin="git">
    <configVersion>2</configVersion>
    <userRemoteConfigs>
      <hudson.plugins.git.UserRemoteConfig>
        <url>git@github.com:theorchard/python-deployment-utils.git</url>
        <credentialsId>@GITHUB_CREDENTIAL_ID@</credentialsId>
      </hudson.plugins.git.UserRemoteConfig>
    </userRemoteConfigs>
    <branches>
      <hudson.plugins.git.BranchSpec>
        <name>master</name>
      </hudson.plugins.git.BranchSpec>
    </branches>
    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
    <submoduleCfg class="list"/>
    <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>set +x

cd fargate

echo &quot;SERVICE_NAME is ${SERVICE_NAME}&quot;
echo &quot;CLUSTER_NAME is ${CLUSTER_NAME}&quot;
echo &quot;FARGATE_SERVICE_NAME is ${FARGATE_SERVICE_NAME}&quot;
echo &quot;TASK_FAMILY is ${TASK_FAMILY}&quot;
echo &quot;CONTAINER_NAME is ${CONTAINER_NAME}&quot;

python3.6 -m venv venv
. ./venv/bin/activate

pip install -r requirements.txt

set -x

python -u deploy.py
</command>
    </hudson.tasks.Shell>
  </builders>
  <publishers>
    <jenkins.plugins.slack.SlackNotifier plugin="slack">
      <baseUrl></baseUrl>
      <teamDomain>orcd</teamDomain>
      <authToken></authToken>
      <tokenCredentialId>@SLACK_CREDENTIAL_ID@</tokenCredentialId>
      <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>true</includeCustomMessage>
      <customMessage>Commit SHA $GIT_COMMIT</customMessage>
      <customMessageSuccess></customMessageSuccess>
      <customMessageAborted></customMessageAborted>
      <customMessageNotBuilt></customMessageNotBuilt>
      <customMessageUnstable></customMessageUnstable>
      <customMessageFailure></customMessageFailure>
    </jenkins.plugins.slack.SlackNotifier>
  </publishers>
  <buildWrappers>
    <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup">
      <deleteDirs>false</deleteDirs>
      <cleanupParameter></cleanupParameter>
      <externalDelete></externalDelete>
      <disableDeferredWipeout>false</disableDeferredWipeout>
    </hudson.plugins.ws__cleanup.PreBuildCleanup>
  </buildWrappers>
</project>
