Skip to content

Commit

Permalink
chore(garbage-collector) adds aws gc stage to jenkinsfile_gc pipeli…
Browse files Browse the repository at this point in the history
…ne (#1527)

* chore(garbage-collector) adds aws gc stage to jenkinsfile_gc pipeline

Signed-off-by: jayfranco999 <[email protected]>

* fixup

Signed-off-by: jayfranco999 <[email protected]>

* fixup

Signed-off-by: jayfranco999 <[email protected]>

---------

Signed-off-by: jayfranco999 <[email protected]>
Co-authored-by: Damien Duportal <[email protected]>
  • Loading branch information
jayfranco999 and dduportal authored Nov 15, 2024
1 parent 55fce2d commit 2e64b35
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions Jenkinsfile_gc
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,30 @@ pipeline {
PACKER_AZURE = credentials('packer-azure-serviceprincipal-sponsorship')
}
steps {
sh 'az login --service-principal -u "$PACKER_AZURE_CLIENT_ID" -p "$PACKER_AZURE_CLIENT_SECRET" -t "$PACKER_AZURE_TENANT_ID"'
sh 'az account set -s "$PACKER_AZURE_SUBSCRIPTION_ID"'
sh './cleanup/azure_gallery_images.sh 1 dev'
sh './cleanup/azure_gallery_images.sh 7 staging'
sh './cleanup/azure.sh 1 dev'
sh './cleanup/azure.sh 1 staging'
sh './cleanup/azure.sh 1 prod'
sh 'az login --service-principal -u "$PACKER_AZURE_CLIENT_ID" -p "$PACKER_AZURE_CLIENT_SECRET" -t "$PACKER_AZURE_TENANT_ID"'
sh 'az account set -s "$PACKER_AZURE_SUBSCRIPTION_ID"'
sh './cleanup/azure_gallery_images.sh 1 dev'
sh './cleanup/azure_gallery_images.sh 7 staging'
sh './cleanup/azure.sh 1 dev'
sh './cleanup/azure.sh 1 staging'
sh './cleanup/azure.sh 1 prod'
}
}
stage('GC on AWS us-east-2') {
environment {
AWS_ACCESS_KEY_ID = credentials('packer-aws-access-key-id')
AWS_SECRET_ACCESS_KEY = credentials('packer-aws-secret-access-key')
AWS_DEFAULT_REGION = 'us-east-2'
}
steps {
sh 'bash ./cleanup/aws.sh'
sh './cleanup/aws_images.sh 1 dev'
sh './cleanup/aws_images.sh 7 staging'
sh './cleanup/aws_images.sh 60 prod'
sh './cleanup/aws_snapshots.sh'
}
}
}
}
}
}
}
Empty file modified cleanup/aws.sh
100644 → 100755
Empty file.
Empty file modified cleanup/aws_images.sh
100644 → 100755
Empty file.
Empty file modified cleanup/aws_snapshots.sh
100644 → 100755
Empty file.

0 comments on commit 2e64b35

Please sign in to comment.