From 1bb86199fd49bef7ee7309f31e0ea67f51bcab87 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Fri, 25 Apr 2025 16:03:18 -0600 Subject: [PATCH 01/13] Update Jenkins deploy to new Rancher test server URL --- Jenkinsfile | 4 ++-- Jenkinsfile-image-cleanup | 2 +- Jenkinsfile-undeploy-staging | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9fca0c4e4..cabebea0a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -145,7 +145,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod2"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { tadaWithWerfNamespaces(rancherProject: "reopt-api-staging", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ @@ -180,7 +180,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod2"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { tadaWithWerfNamespaces(rancherProject: "reopt-api-production", primaryBranch: "master") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ diff --git a/Jenkinsfile-image-cleanup b/Jenkinsfile-image-cleanup index 30fec4993..881a2d607 100644 --- a/Jenkinsfile-image-cleanup +++ b/Jenkinsfile-image-cleanup @@ -38,7 +38,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-test", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod2", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod2", rancherProject: "reopt-api-production"]]) { + tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-test", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod3", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod2", rancherProject: "reopt-api-production"]]) { withCredentials([gitUsernamePassword(credentialsId: "github-nrel-gov-admin")]) { sh "werf cleanup --scan-context-namespace-only" } diff --git a/Jenkinsfile-undeploy-staging b/Jenkinsfile-undeploy-staging index 571b34ba8..f68483607 100644 --- a/Jenkinsfile-undeploy-staging +++ b/Jenkinsfile-undeploy-staging @@ -55,7 +55,7 @@ pipeline { stages { stage("undeploy-branches") { steps { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod2"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { tadaUndeployEachBranch(rancherProject: env.RANCHER_PROJECT, undeployDeletedBranches: params.UNDEPLOY_DELETED_BRANCHES, undeployMergedBranches: params.UNDEPLOY_MERGED_BRANCHES, undeployBranchNames: params.UNDEPLOY_BRANCH_NAMES, primaryBranch: "master") { tadaWithWerfEnv(rancherProject: env.RANCHER_PROJECT, dbBaseName: env.DB_BASE_NAME) { tadaUndeployBranch() From 36687467f01cd05c553ec292e4e6ad912fe42600 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Fri, 25 Apr 2025 20:33:32 -0600 Subject: [PATCH 02/13] Update new cluster project name to current "default" --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index cabebea0a..e0050684f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -146,7 +146,7 @@ pipeline { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { - tadaWithWerfNamespaces(rancherProject: "reopt-api-staging", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { + tadaWithWerfNamespaces(rancherProject: "default", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ werf converge \ From 2e4ce7ead266fb6a8b885d723c15c624a7aa6ea9 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Fri, 25 Apr 2025 20:38:37 -0600 Subject: [PATCH 03/13] Try rancherProject test-reopt (unlikely) --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e0050684f..09487a5d7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -146,7 +146,7 @@ pipeline { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { - tadaWithWerfNamespaces(rancherProject: "default", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { + tadaWithWerfNamespaces(rancherProject: "test-reopt", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ werf converge \ From 62059789db7c93423fb7fe211d2922fb48fe1aa8 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Fri, 25 Apr 2025 20:40:03 -0600 Subject: [PATCH 04/13] Fix capitalization of "Default" project --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 09487a5d7..909c2535f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -146,7 +146,7 @@ pipeline { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { - tadaWithWerfNamespaces(rancherProject: "test-reopt", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { + tadaWithWerfNamespaces(rancherProject: "Default", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ werf converge \ From eaf88f969b1dc5c5949fb0d2ec5ffd174796a252 Mon Sep 17 00:00:00 2001 From: Nick Muerdter <12112+GUI@users.noreply.github.com> Date: Tue, 13 May 2025 13:06:48 -0600 Subject: [PATCH 05/13] Fix compatibility with newer Kubernetes versions. CronJob is now in the `batch/v1` version, not the older `v1beta1`. --- .helm/templates/ecr-image-pull-secret.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.helm/templates/ecr-image-pull-secret.yaml b/.helm/templates/ecr-image-pull-secret.yaml index c46fc607c..6f4f759a1 100644 --- a/.helm/templates/ecr-image-pull-secret.yaml +++ b/.helm/templates/ecr-image-pull-secret.yaml @@ -82,7 +82,7 @@ spec: - secretRef: name: {{ .Chart.Name }}-ecr-login-renew-secrets --- -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: name: {{ .Chart.Name }}-ecr-login-renew-cron-job From 10df16e7206cde60259d29d2692808e56fdc361b Mon Sep 17 00:00:00 2001 From: bill-becker Date: Fri, 8 Aug 2025 07:14:55 -0600 Subject: [PATCH 06/13] Update prod and stage namespaces and make ponderosa temp main branch for prod deploy --- Jenkinsfile | 16 ++++++++-------- Jenkinsfile-deploy | 2 +- Jenkinsfile-undeploy-staging | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 909c2535f..e1c7c93e1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -111,7 +111,7 @@ pipeline { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-test"]) { - tadaWithWerfNamespaces(rancherProject: "reopt-api-dev", primaryBranch: "master", dbBaseName: "reopt_api_development", baseDomain: "${DEVELOPMENT_BASE_DOMAIN}") { + tadaWithWerfNamespaces(rancherProject: "reopt-api-dev", primaryBranch: "ponderosa", dbBaseName: "reopt_api_development", baseDomain: "${DEVELOPMENT_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ werf converge \ @@ -122,7 +122,7 @@ pipeline { --set='ecrAwsSecretAccessKey=${AWS_SECRET_ACCESS_KEY}' \ --set='branchName=${BRANCH_NAME}' \ --set='ingressHost=${DEPLOY_BRANCH_DOMAIN}' \ - --set='tempIngressHost=${tadaDeployBranchDomain(baseDomain: env.DEVELOPMENT_TEMP_BASE_DOMAIN, primaryBranch: "master")}' \ + --set='tempIngressHost=${tadaDeployBranchDomain(baseDomain: env.DEVELOPMENT_TEMP_BASE_DOMAIN, primaryBranch: "ponderosa")}' \ --set='dbName=${DEPLOY_BRANCH_DB_NAME}' """ } @@ -134,7 +134,7 @@ pipeline { } stage("deploy-staging") { - when { expression { params.STAGING_DEPLOY || env.BRANCH_NAME == "master" } } + when { expression { params.STAGING_DEPLOY || env.BRANCH_NAME == "ponderosa" } } environment { DEPLOY_ENV = "staging" @@ -146,7 +146,7 @@ pipeline { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { - tadaWithWerfNamespaces(rancherProject: "Default", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { + tadaWithWerfNamespaces(rancherProject: "reopt-api-staging", primaryBranch: "ponderosa", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ werf converge \ @@ -157,7 +157,7 @@ pipeline { --set='ecrAwsSecretAccessKey=${AWS_SECRET_ACCESS_KEY}' \ --set='branchName=${BRANCH_NAME}' \ --set='ingressHost=${DEPLOY_BRANCH_DOMAIN}' \ - --set='tempIngressHost=${tadaDeployBranchDomain(baseDomain: env.STAGING_TEMP_BASE_DOMAIN, primaryBranch: "master")}' \ + --set='tempIngressHost=${tadaDeployBranchDomain(baseDomain: env.STAGING_TEMP_BASE_DOMAIN, primaryBranch: "ponderosa")}' \ --set='dbName=${DEPLOY_BRANCH_DB_NAME}' """ } @@ -169,7 +169,7 @@ pipeline { } stage("deploy-production") { - when { branch "master" } + when { branch "ponderosa" } environment { DEPLOY_ENV = "production" @@ -180,8 +180,8 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { - tadaWithWerfNamespaces(rancherProject: "reopt-api-production", primaryBranch: "master") { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod4"]) { + tadaWithWerfNamespaces(rancherProject: "reopt-api-production", primaryBranch: "ponderosa") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ werf converge \ diff --git a/Jenkinsfile-deploy b/Jenkinsfile-deploy index ec9fed809..2e3799ffe 100644 --- a/Jenkinsfile-deploy +++ b/Jenkinsfile-deploy @@ -12,7 +12,7 @@ properties([ $class: "GitParameterDefinition", name: "PARAM_BRANCH", type: "PT_BRANCH", - defaultValue: "origin/master", + defaultValue: "origin/ponderosa", sortMode: "ASCENDING_SMART", selectedValue: "DEFAULT", quickFilterEnabled: true, diff --git a/Jenkinsfile-undeploy-staging b/Jenkinsfile-undeploy-staging index f68483607..8ea167009 100644 --- a/Jenkinsfile-undeploy-staging +++ b/Jenkinsfile-undeploy-staging @@ -7,7 +7,7 @@ pipeline { buildDiscarder(logRotator(daysToKeepStr: "30")) } triggers { - cron(env.BRANCH_NAME == "master" ? "H * * * *" : "") + cron(env.BRANCH_NAME == "ponderosa" ? "H * * * *" : "") } environment { @@ -56,7 +56,7 @@ pipeline { stage("undeploy-branches") { steps { withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { - tadaUndeployEachBranch(rancherProject: env.RANCHER_PROJECT, undeployDeletedBranches: params.UNDEPLOY_DELETED_BRANCHES, undeployMergedBranches: params.UNDEPLOY_MERGED_BRANCHES, undeployBranchNames: params.UNDEPLOY_BRANCH_NAMES, primaryBranch: "master") { + tadaUndeployEachBranch(rancherProject: env.RANCHER_PROJECT, undeployDeletedBranches: params.UNDEPLOY_DELETED_BRANCHES, undeployMergedBranches: params.UNDEPLOY_MERGED_BRANCHES, undeployBranchNames: params.UNDEPLOY_BRANCH_NAMES, primaryBranch: "ponderosa") { tadaWithWerfEnv(rancherProject: env.RANCHER_PROJECT, dbBaseName: env.DB_BASE_NAME) { tadaUndeployBranch() } From 9acdb96acc146e7c7f137032b3cc8cea133d0517 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Fri, 8 Aug 2025 07:20:37 -0600 Subject: [PATCH 07/13] Fix production credentialsId for image cleanup --- Jenkinsfile-image-cleanup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-image-cleanup b/Jenkinsfile-image-cleanup index 881a2d607..f080c6229 100644 --- a/Jenkinsfile-image-cleanup +++ b/Jenkinsfile-image-cleanup @@ -38,7 +38,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-test", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod3", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod2", rancherProject: "reopt-api-production"]]) { + tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-test", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod3", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod4", rancherProject: "reopt-api-production"]]) { withCredentials([gitUsernamePassword(credentialsId: "github-nrel-gov-admin")]) { sh "werf cleanup --scan-context-namespace-only" } From dbe162a78a250c2b8446290e538a7371e2c8e84f Mon Sep 17 00:00:00 2001 From: bill-becker Date: Fri, 8 Aug 2025 10:45:57 -0600 Subject: [PATCH 08/13] Reduce production pods/containers temporarily for test-reopt on Ponderosa Rancher --- .helm/values.production.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.helm/values.production.yaml b/.helm/values.production.yaml index 041ea45c1..170b59418 100644 --- a/.helm/values.production.yaml +++ b/.helm/values.production.yaml @@ -1,12 +1,12 @@ appEnv: production djangoSettingsModule: reopt_api.production_settings -djangoReplicas: 10 +djangoReplicas: 2 djangoMemoryRequest: "2000Mi" djangoMemoryLimit: "2000Mi" -celeryReplicas: 10 +celeryReplicas: 4 celeryMemoryRequest: "900Mi" celeryMemoryLimit: "900Mi" -juliaReplicas: 10 +juliaReplicas: 4 juliaCpuRequest: "1000m" juliaCpuLimit: "4000m" juliaMemoryRequest: "8000Mi" From b96fb084be7dc758579577baa8f7f072e0753cd0 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 13 Aug 2025 11:34:31 -0600 Subject: [PATCH 09/13] Update production deploy to pondorosa.nrel.gov --- Jenkinsfile | 2 +- Jenkinsfile-image-cleanup | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e1c7c93e1..4ca5f2162 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -180,7 +180,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod4"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod5"]) { tadaWithWerfNamespaces(rancherProject: "reopt-api-production", primaryBranch: "ponderosa") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ diff --git a/Jenkinsfile-image-cleanup b/Jenkinsfile-image-cleanup index f080c6229..60f2298b1 100644 --- a/Jenkinsfile-image-cleanup +++ b/Jenkinsfile-image-cleanup @@ -38,7 +38,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-test", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod3", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod4", rancherProject: "reopt-api-production"]]) { + tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-test", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod3", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod5", rancherProject: "reopt-api-production"]]) { withCredentials([gitUsernamePassword(credentialsId: "github-nrel-gov-admin")]) { sh "werf cleanup --scan-context-namespace-only" } From 63670583e5bf7f6d879e6fb0a30fd4d478bc6028 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 13 Aug 2025 11:36:07 -0600 Subject: [PATCH 10/13] Revert "Reduce production pods/containers temporarily for test-reopt on Ponderosa Rancher" This reverts commit dbe162a78a250c2b8446290e538a7371e2c8e84f. --- .helm/values.production.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.helm/values.production.yaml b/.helm/values.production.yaml index 170b59418..041ea45c1 100644 --- a/.helm/values.production.yaml +++ b/.helm/values.production.yaml @@ -1,12 +1,12 @@ appEnv: production djangoSettingsModule: reopt_api.production_settings -djangoReplicas: 2 +djangoReplicas: 10 djangoMemoryRequest: "2000Mi" djangoMemoryLimit: "2000Mi" -celeryReplicas: 4 +celeryReplicas: 10 celeryMemoryRequest: "900Mi" celeryMemoryLimit: "900Mi" -juliaReplicas: 4 +juliaReplicas: 10 juliaCpuRequest: "1000m" juliaCpuLimit: "4000m" juliaMemoryRequest: "8000Mi" From 99e7c157826a463b4230ab6e6d65df04744af0f8 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 13 Aug 2025 12:11:06 -0600 Subject: [PATCH 11/13] Change primaryBranch back to master --- Jenkinsfile | 14 +++++++------- Jenkinsfile-deploy | 2 +- Jenkinsfile-undeploy-staging | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4ca5f2162..5c7a17832 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -111,7 +111,7 @@ pipeline { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-test"]) { - tadaWithWerfNamespaces(rancherProject: "reopt-api-dev", primaryBranch: "ponderosa", dbBaseName: "reopt_api_development", baseDomain: "${DEVELOPMENT_BASE_DOMAIN}") { + tadaWithWerfNamespaces(rancherProject: "reopt-api-dev", primaryBranch: "master", dbBaseName: "reopt_api_development", baseDomain: "${DEVELOPMENT_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ werf converge \ @@ -122,7 +122,7 @@ pipeline { --set='ecrAwsSecretAccessKey=${AWS_SECRET_ACCESS_KEY}' \ --set='branchName=${BRANCH_NAME}' \ --set='ingressHost=${DEPLOY_BRANCH_DOMAIN}' \ - --set='tempIngressHost=${tadaDeployBranchDomain(baseDomain: env.DEVELOPMENT_TEMP_BASE_DOMAIN, primaryBranch: "ponderosa")}' \ + --set='tempIngressHost=${tadaDeployBranchDomain(baseDomain: env.DEVELOPMENT_TEMP_BASE_DOMAIN, primaryBranch: "master")}' \ --set='dbName=${DEPLOY_BRANCH_DB_NAME}' """ } @@ -134,7 +134,7 @@ pipeline { } stage("deploy-staging") { - when { expression { params.STAGING_DEPLOY || env.BRANCH_NAME == "ponderosa" } } + when { expression { params.STAGING_DEPLOY || env.BRANCH_NAME == "master" } } environment { DEPLOY_ENV = "staging" @@ -146,7 +146,7 @@ pipeline { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { - tadaWithWerfNamespaces(rancherProject: "reopt-api-staging", primaryBranch: "ponderosa", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { + tadaWithWerfNamespaces(rancherProject: "reopt-api-staging", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ werf converge \ @@ -157,7 +157,7 @@ pipeline { --set='ecrAwsSecretAccessKey=${AWS_SECRET_ACCESS_KEY}' \ --set='branchName=${BRANCH_NAME}' \ --set='ingressHost=${DEPLOY_BRANCH_DOMAIN}' \ - --set='tempIngressHost=${tadaDeployBranchDomain(baseDomain: env.STAGING_TEMP_BASE_DOMAIN, primaryBranch: "ponderosa")}' \ + --set='tempIngressHost=${tadaDeployBranchDomain(baseDomain: env.STAGING_TEMP_BASE_DOMAIN, primaryBranch: "master")}' \ --set='dbName=${DEPLOY_BRANCH_DB_NAME}' """ } @@ -169,7 +169,7 @@ pipeline { } stage("deploy-production") { - when { branch "ponderosa" } + when { branch "master" } environment { DEPLOY_ENV = "production" @@ -181,7 +181,7 @@ pipeline { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod5"]) { - tadaWithWerfNamespaces(rancherProject: "reopt-api-production", primaryBranch: "ponderosa") { + tadaWithWerfNamespaces(rancherProject: "reopt-api-production", primaryBranch: "master") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ werf converge \ diff --git a/Jenkinsfile-deploy b/Jenkinsfile-deploy index 2e3799ffe..ec9fed809 100644 --- a/Jenkinsfile-deploy +++ b/Jenkinsfile-deploy @@ -12,7 +12,7 @@ properties([ $class: "GitParameterDefinition", name: "PARAM_BRANCH", type: "PT_BRANCH", - defaultValue: "origin/ponderosa", + defaultValue: "origin/master", sortMode: "ASCENDING_SMART", selectedValue: "DEFAULT", quickFilterEnabled: true, diff --git a/Jenkinsfile-undeploy-staging b/Jenkinsfile-undeploy-staging index 8ea167009..f68483607 100644 --- a/Jenkinsfile-undeploy-staging +++ b/Jenkinsfile-undeploy-staging @@ -7,7 +7,7 @@ pipeline { buildDiscarder(logRotator(daysToKeepStr: "30")) } triggers { - cron(env.BRANCH_NAME == "ponderosa" ? "H * * * *" : "") + cron(env.BRANCH_NAME == "master" ? "H * * * *" : "") } environment { @@ -56,7 +56,7 @@ pipeline { stage("undeploy-branches") { steps { withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { - tadaUndeployEachBranch(rancherProject: env.RANCHER_PROJECT, undeployDeletedBranches: params.UNDEPLOY_DELETED_BRANCHES, undeployMergedBranches: params.UNDEPLOY_MERGED_BRANCHES, undeployBranchNames: params.UNDEPLOY_BRANCH_NAMES, primaryBranch: "ponderosa") { + tadaUndeployEachBranch(rancherProject: env.RANCHER_PROJECT, undeployDeletedBranches: params.UNDEPLOY_DELETED_BRANCHES, undeployMergedBranches: params.UNDEPLOY_MERGED_BRANCHES, undeployBranchNames: params.UNDEPLOY_BRANCH_NAMES, primaryBranch: "master") { tadaWithWerfEnv(rancherProject: env.RANCHER_PROJECT, dbBaseName: env.DB_BASE_NAME) { tadaUndeployBranch() } From eeb1144c55bac4e785802db326c78e50d1ca0972 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 13 Aug 2025 12:36:06 -0600 Subject: [PATCH 12/13] Change credentials to prod4 from prod3 for staging --- Jenkinsfile | 2 +- Jenkinsfile-image-cleanup | 2 +- Jenkinsfile-undeploy-staging | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5c7a17832..0a4544090 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -145,7 +145,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod4"]) { tadaWithWerfNamespaces(rancherProject: "reopt-api-staging", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ diff --git a/Jenkinsfile-image-cleanup b/Jenkinsfile-image-cleanup index 60f2298b1..eb8031339 100644 --- a/Jenkinsfile-image-cleanup +++ b/Jenkinsfile-image-cleanup @@ -38,7 +38,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-test", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod3", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod5", rancherProject: "reopt-api-production"]]) { + tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-test", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod4", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod5", rancherProject: "reopt-api-production"]]) { withCredentials([gitUsernamePassword(credentialsId: "github-nrel-gov-admin")]) { sh "werf cleanup --scan-context-namespace-only" } diff --git a/Jenkinsfile-undeploy-staging b/Jenkinsfile-undeploy-staging index f68483607..548e0045b 100644 --- a/Jenkinsfile-undeploy-staging +++ b/Jenkinsfile-undeploy-staging @@ -55,7 +55,7 @@ pipeline { stages { stage("undeploy-branches") { steps { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod4"]) { tadaUndeployEachBranch(rancherProject: env.RANCHER_PROJECT, undeployDeletedBranches: params.UNDEPLOY_DELETED_BRANCHES, undeployMergedBranches: params.UNDEPLOY_MERGED_BRANCHES, undeployBranchNames: params.UNDEPLOY_BRANCH_NAMES, primaryBranch: "master") { tadaWithWerfEnv(rancherProject: env.RANCHER_PROJECT, dbBaseName: env.DB_BASE_NAME) { tadaUndeployBranch() From 36cc89958c03e4b1731b38090e4b6e510ff687a8 Mon Sep 17 00:00:00 2001 From: bill-becker Date: Wed, 13 Aug 2025 12:44:03 -0600 Subject: [PATCH 13/13] Change development deploys to test-ponderosa --- Jenkinsfile | 2 +- Jenkinsfile-image-cleanup | 2 +- Jenkinsfile-undeploy-develop | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0a4544090..b6a699bf2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -110,7 +110,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-test"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod4"]) { tadaWithWerfNamespaces(rancherProject: "reopt-api-dev", primaryBranch: "master", dbBaseName: "reopt_api_development", baseDomain: "${DEVELOPMENT_BASE_DOMAIN}") { withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) { sh """ diff --git a/Jenkinsfile-image-cleanup b/Jenkinsfile-image-cleanup index eb8031339..10b5c0951 100644 --- a/Jenkinsfile-image-cleanup +++ b/Jenkinsfile-image-cleanup @@ -38,7 +38,7 @@ pipeline { steps { withDockerRegistry(url: "https://${env.WERF_REPO}", credentialsId: "ecr:us-east-2:aws-nrel-tada-ci") { withCredentials([aws(credentialsId: "aws-nrel-tada-ci")]) { - tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-test", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod4", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod5", rancherProject: "reopt-api-production"]]) { + tadaRancherAllProjectNamespacesKubeConfig(projects: [[credentialsId: "kubeconfig-nrel-reopt-prod4", rancherProject: "reopt-api-dev"], [credentialsId: "kubeconfig-nrel-reopt-prod4", rancherProject: "reopt-api-staging"], [credentialsId: "kubeconfig-nrel-reopt-prod5", rancherProject: "reopt-api-production"]]) { withCredentials([gitUsernamePassword(credentialsId: "github-nrel-gov-admin")]) { sh "werf cleanup --scan-context-namespace-only" } diff --git a/Jenkinsfile-undeploy-develop b/Jenkinsfile-undeploy-develop index a24e97e2b..b0c9f9a86 100644 --- a/Jenkinsfile-undeploy-develop +++ b/Jenkinsfile-undeploy-develop @@ -55,7 +55,7 @@ pipeline { stages { stage("undeploy-branches") { steps { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-test"]) { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod4"]) { tadaUndeployEachBranch(rancherProject: env.RANCHER_PROJECT, undeployDeletedBranches: params.UNDEPLOY_DELETED_BRANCHES, undeployMergedBranches: params.UNDEPLOY_MERGED_BRANCHES, undeployBranchNames: params.UNDEPLOY_BRANCH_NAMES, primaryBranch: "master") { tadaWithWerfEnv(rancherProject: env.RANCHER_PROJECT, dbBaseName: env.DB_BASE_NAME) { tadaUndeployBranch()