Deploy application using Jenkinsfile and AWS Code deploy
<p>I am migrating from Jenkins 1.x to Jenkins 2. I want to build and deploy application using Jenkinsfile. 
I am able to build gradle application, but I am confused about deploying application via AWS Codedeploy using Jenkinsfile.</p>

<p>Here is my jenkinsfile</p>

<pre><code>node {
   // Mark the code checkout 'stage'....
   stage 'Checkout'
   // Get some code from a GitHub repository
      git branch: 'master', 
       credentialsId: 'xxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxx', 
       url: 'https://github.com/somerepo/someapplication.git'

   // Mark the code build 'stage'....
   stage 'Build'
   // Run the gradle build
      sh '/usr/share/gradle/bin/gradle build -x test -q buildZip -Pmule_env=aws-dev -Pmule_config=server'

    stage 'Deploy via Codedeploy'
    //Run using codedeploy agent
}
</code></pre>

<p>I have searched many tutorial but they're using AWS Code deploy plugin instead.
Could you help me deploying application via AWS Codedeploy using Jenkinsfile?</p>

<p>Thank you.</p>