In this example I’m going to show how to define a Jenkinsfile using the Scripted format (a domain-specific language based on Groovy). This example only consider the “dev” environment, I have plans to update this post in the future with other environments. If you want to understand more about what Continuous Integration is and how it does work, visit this article from Martin Fowler. Before start, I will define the context in which I’m using this Jenkinsfile to give you more visibility about the utiliness of it:
Exception handling Exceptions are in general very useful, they help you to understand what could go wrong or what was wrong. When you are developing web services, if you propagate exceptions properly, they could help you to reduce the number of request from developers using your API asking help or support, by implementing meaningful responses, i.e., the proper implementation of HTTP status codes and providing as much information as possible in the response.
You have EC2 instances running in AWS VPC Private subnets, isolated from the outside (internet), only reachable from the internal subnets of the VPC.
How to reach out (ping, ssh, scp, curl, etc) your private EC2 instances running in your AWS VPC Private subnets from your home network in a secure way?