Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pipeline{
- agent any
- stages{
- stage('Preparation'){
- steps{
- sh 'echo Building...'
- sh 'aws configure set region us-east-2'
- sh 'aws configure set aws_access_key_id ...'
- sh 'aws configure set aws_secret_access_key ...'
- sh 'aws configure set output json'
- sh 'aws elb create-load-balancer --load-balancer-name ci-load-balancer --listeners "Protocol=HTTP,LoadBalancerPort=80,InstanceProtocol=HTTP,InstancePort=80" --availability-zones us-east-2a us-east-2b'
- sh 'aws autoscaling create-launch-configuration --launch-configuration-name ci-launch-config --instance-type t2.micro --image-id ami-34032e51'
- sh 'aws autoscaling create-auto-scaling-group --auto-scaling-group-name ci-auto-scaling-group --launch-configuration-name ci-launch-config --min-size 2 --max-size 2 --load-balancer-names ci-load-balancer --health-check-type ELB --health-check-grace-period 120 --availability-zones us-east-2a us-east-2b'
- }
- }
- stage('Build'){
- steps{
- sh 'echo Building...'
- }
- }
- stage('Test'){
- steps{
- sh 'echo Testing...'
- }
- }
- stage('Deploy'){
- steps{
- sh 'echo Deploying...'
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement