1

Our code is hosted in Bitbucket, originally we wanted to use Bitbucket pipeline to do the build. Since Bitbucket pipeline does not support building windows application, we need to find alternative solution to build.

2 options: 1. Use Jenkins as build server to build 2. Use AWS CodePipeline to build

After code is built, it needs to be downloaded to a system connected with hardware. Thus AWS CodeDeploy to on-premise solution seems the right choice.

Here are the questions: 1. Is the assumption of using AWS CodeDeploy to download applications to on-premise correct? 2. If not correct, what should be the solution?

If using Jenkins pipeline: 3. If using Jenkins for build server, would specifying "Poll SCM" or use GitPlugin be good enough for the connection from Bitbucket to Jenkins pipeline? 4. Would Webhook help for the connection from Bitbucket to Jenkins' pipeline? Does it help in doing something when pull request? 5. How to connect Jenkins to AWS CodeDeploy if #1 assumption is correct?

  1. If using AWS CodePipeline and then CodeDeploy, what are the steps?

Thanks a lot in advance

1 Answers1

0

Here are the answers:

  1. Is the assumption of using AWS CodeDeploy to download applications to on-premise correct?

Yes

  1. If not correct, what should be the solution?

CodeDeploy will download application or artifacts on the server where it is running.

  1. If using Jenkins for build server, would specifying "Poll SCM" or use GitPlugin be good enough for the connection from Bitbucket to Jenkins pipeline?

You can use the BitBucket Jenkins Plugin @ https://wiki.jenkins.io/display/JENKINS/Bitbucket+Plugin

  1. Would Webhook help for the connection from Bitbucket to Jenkins' pipeline? Does it help in doing something when pull request?

You can look at the plugin documentation to figure out if this feature is supported.

  1. How to connect Jenkins to AWS CodeDeploy if #1 assumption is correct?

You can use the Jenkins Plugin for CodeDeploy @ https://github.com/awslabs/aws-codedeploy-plugin

If using AWS CodePipeline and then CodeDeploy, what are the steps?

If you want to do the orchestration of the build process (e.g. pulling from SCM, building etc.) then you will use CodePipeline. CodePipeline will kick-off as soon as it detects changes in the SCM and then will execute CodeBuild and eventually CodeDeploy to Deploy. You may also end up setting a Notification using EventBus or CloudWatch Events.

We have a project which has used Jenkins in local server already. To utilize the existing work, creating 4-stage pipeline in AWS

For the above, you can use the CodeDeploy Plugin in Jenkins to deploy to AWS. You can keep the existing Jenkins environment as is.

you want to do the orchestration of the build process

In a build process there are different steps that you would need to execute, e.g. pull from SCM, build/compile, and deploy. Going from one state to another ( pull from sim -> build -> deploy) is called the orchestration of the build process.

mmansoor
  • 580
  • 5
  • 11
  • Thank you very much Mmansoor for prompt answer!! They are really helpful! – FastLearner Jan 20 '20 at 16:02
  • Thank you very much Mmansoor for prompt answer!! They are really helpful! We have a project which has used Jenkins in local server already. To utilize the existing work, creating 4-stage pipeline in AWS CodePipeline that utilizes Jenkins as a build server might lead to minimal work. 1. Not sure if that solution can easily transition to use CodePipeline for build completely for new project. 2. How the security issue is resolved for Jenkins(server in cloud) + CodePipeline? 3. Will converting Jenkins to use CodePipleline completely cost more money since Jenkins is free? – FastLearner Jan 20 '20 at 17:22
  • " you want to do the orchestration of the build process": does the orchestration include autoscaling build server? The autoscaling build server feature in my mind is an additional build server will be allocated and instantiated when doing parallel builds (for example, a checkin occurs when build for another checkin is in process). 2nd instance of build should be kicked off and started. – FastLearner Jan 20 '20 at 17:25