Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed the env variable in scripts #864

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions jenkins/tenant/aws/ecoeng_01/PolicyJenkinsfileDaily
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ pipeline {
contact4 = "[email protected]"
// Find the all available policies: https://github.com/redhat-performance/cloud-governance/tree/main/cloud_governance/policy
// By default, all policies are running in dry_run="yes" mode and the whole list can be found in run_policies.py
// POLICIES_IN_ACTION: Policies that run in the dry_run="no" mode
POLICIES_IN_ACTION = '["unattached_volume", "ip_unattached", "zombie_snapshots", "unused_nat_gateway", "s3_inactive", "empty_roles"]'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did u delete "zombie_cluster_resource" ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to simulate the old scenario. After adding the zombie_cluster_resources policy it behaving wiered.


}
stages {
stage('Checkout') { // Checkout (git clone ...) the projects repository
Expand Down Expand Up @@ -76,10 +79,6 @@ pipeline {
withCredentials([string(credentialsId: "${account}-aws-access-key-id", variable: 'access_key'),
string(credentialsId: "${account}-aws-secret-key-id", variable: 'secret_key'),
string(credentialsId: "${account}-s3-bucket", variable: 's3_bucket')]) {
// POLICIES_IN_ACTION: Policies that run in the dry_run="no" mode
env.POLICIES_IN_ACTION = '["unattached_volume", "ip_unattached", "zombie_snapshots", "unused_nat_gateway", "s3_inactive", "empty_roles"]'
if (account == "blueprints")
env.POLICIES_IN_ACTION = '["unattached_volume", "ip_unattached", "zombie_snapshots", "unused_nat_gateway", "s3_inactive", "empty_roles", "zombie_cluster_resource"]'
env.account_name = "${account}"
env.ADMIN_MAIL_LIST = "${accounts_list[account]}"
sh 'python3 jenkins/tenant/aws/common/run_policies.py'
Expand Down