Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .helm/templates/ecr-image-pull-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand Down Expand Up @@ -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-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 """
Expand Down Expand Up @@ -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-prod5"]) {
tadaWithWerfNamespaces(rancherProject: "reopt-api-production", primaryBranch: "master") {
withCredentials([string(credentialsId: "reopt-api-werf-secret-key", variable: "WERF_SECRET_KEY")]) {
sh """
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile-image-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -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-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"
}
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile-undeploy-develop
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile-undeploy-staging
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pipeline {
stages {
stage("undeploy-branches") {
steps {
withKubeConfig([credentialsId: "kubeconfig-nrel-reopt-prod2"]) {
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()
Expand Down
1 change: 1 addition & 0 deletions reoptjl/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ def peak_load_outage_times(request):
summer_load = critical_load[summer_start:autumn_start]
autumn_load = critical_load[autumn_start:winter_start]
peaks = np.array([
# +1s to convert to 1-based indexing because that's what outage_start_time_steps input use
(np.argmax(winter_load) + winter_start) % 8760 + 1,
np.argmax(spring_load) + spring_start + 1,
np.argmax(summer_load) + summer_start + 1,
Expand Down