<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description></description>
  <displayName>Feedback_Deploy_OpsWorks</displayName>
  <keepDependencies>false</keepDependencies>
  <properties>
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <hudson.model.StringParameterDefinition>
          <name>StackId</name>
          <description>Stack ID from opsworks</description>
          <defaultValue>673d7</defaultValue>
        </hudson.model.StringParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>AppId</name>
          <description>App ID from opsworks</description>
          <defaultValue>-f9f340b5b519</defaultValue>
        </hudson.model.StringParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>InstanceId</name>
          <description>Instance ID from opsworks</description>
          <defaultValue></defaultValue>
        </hudson.model.StringParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>S3URL</name>
          <description>S3 URL of your tar.gz file</description>
          <defaultValue></defaultValue>
        </hudson.model.StringParameterDefinition>
        <hudson.model.StringParameterDefinition>
          <name>Branch</name>
          <description>Branch Name of the build which uploaded the S3 tar ball in AWS.</description>
          <defaultValue></defaultValue>
        </hudson.model.StringParameterDefinition>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
    <com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.25">
      <autoRebuild>false</autoRebuild>
      <rebuildDisabled>false</rebuildDisabled>
    </com.sonyericsson.rebuild.RebuildSettings>
    <com.synopsys.arc.jenkinsci.plugins.jobrestrictions.jobs.JobRestrictionProperty plugin="job-restrictions@0.4"/>
    <org.jvnet.hudson.plugins.shelveproject.ShelveProjectProperty plugin="shelve-project-plugin@1.5"/>
  </properties>
  <scm class="hudson.scm.NullSCM"/>
  <assignedNode>Traditional</assignedNode>
  <canRoam>false</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <jdk>(Default)</jdk>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.Shell>
      <command>#!/bin/bash -x

if [ x$S3URL == x ]; then
 TarFile=`aws s3 ls s3://something-artifacts-qa/boomerang/$Branch/ | awk &apos;{print $4}&apos; | tail -1`
 S3URL=&quot;https://s3.amazonaws.com/something-artifacts-qa/boomerang/$Branch/$TarFile&quot;
fi

echo &quot;TarFile = $TarFile&quot;
echo &quot;S3URL = $S3URL&quot;

#updating the S3 URL
echo &quot;updating S3 URL&quot;
aws opsworks --region us-east-1 update-app --app-id $AppId --app-source &quot;{ \&quot;Type\&quot;: \&quot;s3\&quot;, \&quot;Url\&quot;: \&quot;$S3URL\&quot;   }&quot;
Status=`echo $?`

if [ $Status != 0 ]; then
  echo &quot;new version of app update failed. Exiting.....&quot;
  exit 1
fi

echo &quot;Starting the Deployment&quot;
aws opsworks --region us-east-1 create-deployment --stack-id $StackId --app-id $AppId --command &quot;{\&quot;Name\&quot;:\&quot;deploy\&quot;}&quot;
Status=`echo $?`

if [ $Status != 0 ]; then
  echo &quot;Start of the Deployment Failed. Exiting.....&quot;
  exit 1
fi

#Checking Deployment

/home/releasebot/jenkins/scripts/deploy_status_check.sh $StackId</command>
    </hudson.tasks.Shell>
  </builders>
  <publishers>
    <hudson.plugins.parameterizedtrigger.BuildTrigger plugin="parameterized-trigger@2.26">
      <configs>
        <hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
          <configs class="empty-list"/>
          <projects>Feedback_QA_CT</projects>
          <condition>UNSTABLE_OR_BETTER</condition>
          <triggerWithNoParameters>true</triggerWithNoParameters>
        </hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
      </configs>
    </hudson.plugins.parameterizedtrigger.BuildTrigger>
    <hudson.plugins.emailext.ExtendedEmailPublisher plugin="email-ext@2.40.5">
      <recipientList>spock-qa@somethingcabs.com</recipientList>
      <configuredTriggers>
        <hudson.plugins.emailext.plugins.trigger.FailureTrigger>
          <email>
            <recipientList></recipientList>
            <subject>$PROJECT_DEFAULT_SUBJECT</subject>
            <body>$PROJECT_DEFAULT_CONTENT</body>
            <recipientProviders>
              <hudson.plugins.emailext.plugins.recipients.DevelopersRecipientProvider/>
            </recipientProviders>
            <attachmentsPattern></attachmentsPattern>
            <attachBuildLog>false</attachBuildLog>
            <compressBuildLog>false</compressBuildLog>
            <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo>
            <contentType>project</contentType>
          </email>
        </hudson.plugins.emailext.plugins.trigger.FailureTrigger>
        <hudson.plugins.emailext.plugins.trigger.FixedTrigger>
          <email>
            <recipientList></recipientList>
            <subject>$PROJECT_DEFAULT_SUBJECT</subject>
            <body>$PROJECT_DEFAULT_CONTENT</body>
            <recipientProviders>
              <hudson.plugins.emailext.plugins.recipients.DevelopersRecipientProvider/>
              <hudson.plugins.emailext.plugins.recipients.ListRecipientProvider/>
            </recipientProviders>
            <attachmentsPattern></attachmentsPattern>
            <attachBuildLog>false</attachBuildLog>
            <compressBuildLog>false</compressBuildLog>
            <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo>
            <contentType>project</contentType>
          </email>
        </hudson.plugins.emailext.plugins.trigger.FixedTrigger>
        <hudson.plugins.emailext.plugins.trigger.AlwaysTrigger>
          <email>
            <recipientList></recipientList>
            <subject>$PROJECT_DEFAULT_SUBJECT</subject>
            <body>$PROJECT_DEFAULT_CONTENT</body>
            <recipientProviders>
              <hudson.plugins.emailext.plugins.recipients.DevelopersRecipientProvider/>
              <hudson.plugins.emailext.plugins.recipients.ListRecipientProvider/>
            </recipientProviders>
            <attachmentsPattern></attachmentsPattern>
            <attachBuildLog>false</attachBuildLog>
            <compressBuildLog>false</compressBuildLog>
            <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo>
            <contentType>project</contentType>
          </email>
        </hudson.plugins.emailext.plugins.trigger.AlwaysTrigger>
      </configuredTriggers>
      <contentType>text/html</contentType>
      <defaultSubject>$DEFAULT_SUBJECT</defaultSubject>
      <defaultContent>$DEFAULT_CONTENT</defaultContent>
      <attachmentsPattern></attachmentsPattern>
      <presendScript>$DEFAULT_PRESEND_SCRIPT</presendScript>
      <attachBuildLog>true</attachBuildLog>
      <compressBuildLog>true</compressBuildLog>
      <replyTo>$DEFAULT_REPLYTO</replyTo>
      <saveOutput>false</saveOutput>
      <disabled>false</disabled>
    </hudson.plugins.emailext.ExtendedEmailPublisher>
    <org.jenkins.plugins.audit2db.internal.DbAuditPublisherImpl plugin="audit2db@0.5"/>
  </publishers>
  <buildWrappers/>
</project>