From ea806f6e85551e2aa6c68714264d4d210dc65798 Mon Sep 17 00:00:00 2001 From: "Fergus MacConnell WLRS:EX" Date: Tue, 24 Sep 2024 15:49:31 -0700 Subject: [PATCH] Check directory for zip file. --- .github/workflows/.deploy.yml | 12 ++--- backend/openshift.backend.yml | 60 ++++++++++----------- backend/wells/management/commands/export.py | 2 + common/openshift.init.yml | 48 ++++++++--------- 4 files changed, 62 insertions(+), 60 deletions(-) diff --git a/.github/workflows/.deploy.yml b/.github/workflows/.deploy.yml index 167946c39..d97f81203 100644 --- a/.github/workflows/.deploy.yml +++ b/.github/workflows/.deploy.yml @@ -41,12 +41,12 @@ jobs: -p DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }} -p E_LICENSING_AUTH_USERNAME=${{ secrets.E_LICENSING_AUTH_USERNAME }} -p E_LICENSING_AUTH_PASSWORD=${{ secrets.E_LICENSING_AUTH_PASSWORD }} - -p S3_PUBLIC_ACCESS_KEY=${{ secrets.S3_PUBLIC_ACCESS_KEY }} - -p S3_PUBLIC_SECRET_KEY=${{ secrets.S3_PUBLIC_SECRET_KEY }} - -p S3_HOST=${{ secrets.S3_HOST }} - -p S3_ROOT_BUCKET=${{ secrets.S3_ROOT_BUCKET }} - -p MINIO_ACCESS_KEY=${{ secrets.MINIO_ACCESS_KEY }} - -p MINIO_SECRET_KEY=${{ secrets.MINIO_SECRET_KEY }} + # -p S3_PUBLIC_ACCESS_KEY=${{ secrets.S3_PUBLIC_ACCESS_KEY }} + # -p S3_PUBLIC_SECRET_KEY=${{ secrets.S3_PUBLIC_SECRET_KEY }} + # -p S3_HOST=${{ secrets.S3_HOST }} + # -p S3_ROOT_BUCKET=${{ secrets.S3_ROOT_BUCKET }} + # -p MINIO_ACCESS_KEY=${{ secrets.MINIO_ACCESS_KEY }} + # -p MINIO_SECRET_KEY=${{ secrets.MINIO_SECRET_KEY }} database: name: Database diff --git a/backend/openshift.backend.yml b/backend/openshift.backend.yml index a753477ae..7738e2f7c 100644 --- a/backend/openshift.backend.yml +++ b/backend/openshift.backend.yml @@ -366,36 +366,36 @@ objects: configMapKeyRef: key: DB_REPLICATE name: gwells-global-config${NAME_SUFFIX} - - name: MINIO_ACCESS_KEY - valueFrom: - secretKeyRef: - name: minio-access-parameters${NAME_SUFFIX} - key: MINIO_ACCESS_KEY - - name: MINIO_SECRET_KEY - valueFrom: - secretKeyRef: - name: minio-access-parameters${NAME_SUFFIX} - key: MINIO_SECRET_KEY - - name: S3_PUBLIC_ACCESS_KEY - valueFrom: - secretKeyRef: - name: minio-access-parameters${NAME_SUFFIX} - key: S3_PUBLIC_ACCESS_KEY - - name: S3_PUBLIC_SECRET_KEY - valueFrom: - secretKeyRef: - name: minio-access-parameters${NAME_SUFFIX} - key: S3_PUBLIC_SECRET_KEY - - name: S3_HOST - valueFrom: - secretKeyRef: - name: minio-access-parameters${NAME_SUFFIX} - key: S3_HOST - - name: S3_ROOT_BUCKET - valueFrom: - secretKeyRef: - name: minio-access-parameters${NAME_SUFFIX} - key: S3_ROOT_BUCKET + # - name: MINIO_ACCESS_KEY + # valueFrom: + # secretKeyRef: + # name: minio-access-parameters${NAME_SUFFIX} + # key: MINIO_ACCESS_KEY + # - name: MINIO_SECRET_KEY + # valueFrom: + # secretKeyRef: + # name: minio-access-parameters${NAME_SUFFIX} + # key: MINIO_SECRET_KEY + # - name: S3_PUBLIC_ACCESS_KEY + # valueFrom: + # secretKeyRef: + # name: minio-access-parameters${NAME_SUFFIX} + # key: S3_PUBLIC_ACCESS_KEY + # - name: S3_PUBLIC_SECRET_KEY + # valueFrom: + # secretKeyRef: + # name: minio-access-parameters${NAME_SUFFIX} + # key: S3_PUBLIC_SECRET_KEY + # - name: S3_HOST + # valueFrom: + # secretKeyRef: + # name: minio-access-parameters${NAME_SUFFIX} + # key: S3_HOST + # - name: S3_ROOT_BUCKET + # valueFrom: + # secretKeyRef: + # name: minio-access-parameters${NAME_SUFFIX} + # key: S3_ROOT_BUCKET - name: S3_PRIVATE_HOST valueFrom: configMapKeyRef: diff --git a/backend/wells/management/commands/export.py b/backend/wells/management/commands/export.py index 785ed1dff..06916386e 100644 --- a/backend/wells/management/commands/export.py +++ b/backend/wells/management/commands/export.py @@ -203,6 +203,7 @@ def handle(self, *args, **options): for version_desc in self.versioning_descriptor: version = version_desc['version'] sheets = version_desc['sheets_sql'] + print("Current Working Directory - GWELLS.zip: ", os.getcwd()) self.generate_files(zip_filename, spreadsheet_filename, sheets) if options['upload'] == 1: self.upload_files(zip_filename, spreadsheet_filename, version) @@ -332,6 +333,7 @@ def generate_files(self, zip_filename, spreadsheet_filename, sheets: dict): # If there is an existing zip file, remove it. if os.path.exists(zip_filename): os.remove(zip_filename) + print("Current Working Directory - generate_files: ", os.getcwd()) with zipfile.ZipFile(zip_filename, 'w', compression=zipfile.ZIP_DEFLATED) as gwells_zip: if os.path.exists(spreadsheet_filename): os.remove(spreadsheet_filename) diff --git a/common/openshift.init.yml b/common/openshift.init.yml index 17942419b..5bcbf91dc 100644 --- a/common/openshift.init.yml +++ b/common/openshift.init.yml @@ -36,18 +36,18 @@ parameters: required: true - name: E_LICENSING_AUTH_PASSWORD required: true - - name: MINIO_ACCESS_KEY - required: true - - name: MINIO_SECRET_KEY - required: true - - name: S3_PUBLIC_ACCESS_KEY - required: true - - name: S3_PUBLIC_SECRET_KEY - required: true - - name: S3_HOST - required: true - - name: S3_ROOT_BUCKET - required: true + # - name: MINIO_ACCESS_KEY + # required: true + # - name: MINIO_SECRET_KEY + # required: true + # - name: S3_PUBLIC_ACCESS_KEY + # required: true + # - name: S3_PUBLIC_SECRET_KEY + # required: true + # - name: S3_HOST + # required: true + # - name: S3_ROOT_BUCKET + # required: true objects: - apiVersion: v1 kind: Secret @@ -61,18 +61,18 @@ objects: fdw-database-password: ${FDW_DATABASE_PASSWORD} fdw-database-server: "//nrk1-scan.bcgov/envprod1.nrs.bcgov" fdw-database-schema: WELLS - - apiVersion: v1 - kind: Secret - metadata: - name: minio-access-parameters${NAME_SUFFIX} - creationTimestamp: - stringData: - MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY} - MINIO_SECRET_KEY: ${MINIO_SECRET_KEY} - S3_HOST: ${S3_HOST} - S3_ROOT_BUCKET: ${S3_ROOT_BUCKET} - S3_PUBLIC_ACCESS_KEY: ${S3_PUBLIC_ACCESS_KEY} - S3_PUBLIC_SECRET_KEY: ${S3_PUBLIC_SECRET_KEY} + # - apiVersion: v1 + # kind: Secret + # metadata: + # name: minio-access-parameters${NAME_SUFFIX} + # creationTimestamp: + # stringData: + # MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY} + # MINIO_SECRET_KEY: ${MINIO_SECRET_KEY} + # S3_HOST: ${S3_HOST} + # S3_ROOT_BUCKET: ${S3_ROOT_BUCKET} + # S3_PUBLIC_ACCESS_KEY: ${S3_PUBLIC_ACCESS_KEY} + # S3_PUBLIC_SECRET_KEY: ${S3_PUBLIC_SECRET_KEY} - apiVersion: v1 kind: Secret metadata: