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 diff --git a/Jenkinsfile b/Jenkinsfile index 9fca0c4e4..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" @@ -145,8 +145,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-prod2"]) { - tadaWithWerfNamespaces(rancherProject: "reopt-api-staging", primaryBranch: "master", dbBaseName: "reopt_api_staging", baseDomain: "${STAGING_BASE_DOMAIN}") { + withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod3"]) { + 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-prod2"]) { - 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-image-cleanup b/Jenkinsfile-image-cleanup index 30fec4993..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-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-prod4", 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..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 { @@ -55,8 +55,8 @@ pipeline { stages { stage("undeploy-branches") { steps { - withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod2"]) { - tadaUndeployEachBranch(rancherProject: env.RANCHER_PROJECT, undeployDeletedBranches: params.UNDEPLOY_DELETED_BRANCHES, undeployMergedBranches: params.UNDEPLOY_MERGED_BRANCHES, undeployBranchNames: params.UNDEPLOY_BRANCH_NAMES, primaryBranch: "master") { + 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") { tadaWithWerfEnv(rancherProject: env.RANCHER_PROJECT, dbBaseName: env.DB_BASE_NAME) { tadaUndeployBranch() }