Skip to content

Commit

Permalink
Grad release 1.17.0 (#255)
Browse files Browse the repository at this point in the history
* GRAD2-2525: DTO update to sync.

GRAD2-2525: DTO update to sync.

* Develop/alex grad2 2403

* GRAD2-2403
Fix packing slip jasper file to accommodate address line 2

* GRAD2-2403
Fix packing slip jasper file to accommodate address line 2

* GRAD2-2244: task is complete.

GRAD2-2244: task is complete.

* Update pom.xml

* Update build.from.release.branch.deploy.to.dev.yml

* Update build.from.main.branch.deploy.to.dev.yml

* Update build.from.developer.branch.deploy.to.dev.yml

* Update deploy_test.yml

* GRAD2-2244: task is complete.

GRAD2-2244: task is complete.

* Clean up the commented unused codes.

Clean up the commented unused codes.

* Updated pvc claim for prod

* Update pom.xml

---------

Co-authored-by: Jinil Sung <infstar@gmail.com>
Co-authored-by: Kamal Mohammed <kamal.mohammed@outlook.com>
Co-authored-by: Alexander Rybakov <83988488+arybakov-cgi@users.noreply.github.com>
Co-authored-by: Chris Ditcher <chris.ditcher@gov.bc.ca>
Co-authored-by: chris.ditcher <Chris.Ditcher@QP.GOV.BC.CA>
  • Loading branch information
6 people authored Apr 8, 2024
1 parent bfcd1e2 commit 9a9fd05
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
MAX_MEM: "2048Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "5"
STORAGE_LIMIT: "16Gi"
STORAGE_LIMIT: "15Gi"

on:
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows
Expand Down Expand Up @@ -131,4 +131,4 @@ jobs:
- name: ZAP Scan
uses: zaproxy/action-api-scan@v0.1.0
with:
target: 'https://${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}-dev.apps.silver.devops.gov.bc.ca/api/v1/api-docs'
target: 'https://${{ env.REPO_NAME }}-${{ env.OPENSHIFT_NAMESPACE }}-dev.apps.silver.devops.gov.bc.ca/api/v1/api-docs'
2 changes: 1 addition & 1 deletion .github/workflows/build.from.main.branch.deploy.to.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
MAX_MEM: "2048Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "5"
STORAGE_LIMIT: "16Gi"
STORAGE_LIMIT: "15Gi"

on:
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
MAX_MEM: "2048Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "5"
STORAGE_LIMIT: "16Gi"
STORAGE_LIMIT: "15Gi"

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
MAX_MEM: "2048Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "5"
STORAGE_LIMIT: "128Gi"
STORAGE_LIMIT: "127Gi"


on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
MAX_MEM: "2048Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "5"
STORAGE_LIMIT: "16Gi"
STORAGE_LIMIT: "15Gi"


on:
Expand Down
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ca.bc.gov.educ</groupId>
<artifactId>educ-grad-distribution-api</artifactId>
<version>1.8.57</version>
<version>1.8.58</version>
<name>educ-grad-distribution-api</name>
<description>Ministry of Education GRAD DISTRIBUTION API</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ private void mergeDocuments(ProcessorData processorData,String mincode,String fi
objs.setDestinationFileName(pBuilder.toString());
objs.addSources(locations);
objs.mergeDocuments(MemoryUsageSetting.setupMainMemoryOnly());
sftpUtils.sftpUploadTSW(processorData.getBatchId(),mincode,fileName);
}catch (Exception e) {
logger.debug(EXCEPTION,e.getLocalizedMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,6 @@ public class SFTPUtils {
@Value("${sftp.bcmail.known-hosts}")
private String BCMAIL_KNOWN_HOSTS;

@Value("${sftp.tsw.host}")
private String TSW_REMOTE_HOST;
@Value("${sftp.tsw.username}")
private String TSW_SFTP_USERNAME;
@Value("${sftp.tsw.priv-key}")
private String TSW_PRIVATE_KEY;
@Value("${sftp.tsw.pub-key}")
private String TSW_PUBLIC_KEY;
@Value("${sftp.tsw.known-hosts}")
private String TSW_KNOWN_HOSTS;


@Value("${sftp.bcmail.location}")
private String BC_MAIL_LOCATION;

Expand Down Expand Up @@ -89,27 +77,7 @@ public boolean sftpUploadBCMail(Long batchId, String rootFolder, String mincode)
}

/**
* Method specific for uploading files to TSW
* @param batchId batch id
* @param mincode mincode
* @param fileName the filename
* @return true if successful
*/
public boolean sftpUploadTSW(Long batchId,String mincode,String fileName) {
Map<String, List<String>> files = new HashMap<>();
String localFile = formatPath(EducDistributionApiConstants.TMP_DIR + EducDistributionApiConstants.DEL + batchId + EducDistributionApiConstants.DEL + mincode + EducDistributionApiConstants.DEL + fileName+".pdf");
String remoteFile = "/$1$dga5037/EDUC/XTD";
String location1 = remoteFile+"/WEB/"+fileName+".pdf";
String location2 = remoteFile+"/TSWSFTP/"+fileName+".pdf";
String location3 = remoteFile+"/WEB/PST/"+fileName+".pdf";
files.computeIfAbsent(localFile, v -> new ArrayList<>()).add(location1);
files.computeIfAbsent(localFile, v -> new ArrayList<>()).add(location2);
files.computeIfAbsent(localFile, v -> new ArrayList<>()).add(location3);
return sftpUpload(files, TSW_SFTP_USERNAME, TSW_REMOTE_HOST, REMOTE_PORT, TSW_PRIVATE_KEY, TSW_PUBLIC_KEY, TSW_KNOWN_HOSTS);
}

/**
* Method for uploading files to an sftp server
* Method for uploading files to a sftp server
* @param files a map of local -> remote file paths. Use of Map<String, List<String>> enables the key (the file to upload)
* to have multiple upload locations (the List<String> represents the upload locations)
* @param userName the username to log into the sftp server
Expand Down
6 changes: 0 additions & 6 deletions api/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ sftp:
pub-key: ${BCMAIL_SSH_PUBLIC_KEY}
known-hosts: ${BCMAIL_KNOWN_HOSTS_ENTRY}
location: ${BCMAIL_LOCATION}
tsw:
host: ${TSW_SFTP_HOST}
username: ${TSW_SFTP_USER}
priv-key: ${grad_vms_id_rsa}
pub-key: ${grad_vms_id_rsa.pub}
known-hosts: ${TSW_KNOWN_HOSTS_ENTRY}

endpoint:
keycloak:
Expand Down
10 changes: 2 additions & 8 deletions api/src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,7 @@ sftp:
pub-key: 676
known-hosts: 45fsdss
location: /Index/Dev
tsw:
host: 454@tsw.aril.com
username: tswmail
priv-key: 565
pub-key: 888
known-hosts: 5644ddww


#Endpoints
endpoint:
keycloak:
Expand Down Expand Up @@ -173,4 +167,4 @@ splunk:
enabled: false

scheduler:
clean-tmp-cache-cron: 0 0 */4 * * *
clean-tmp-cache-cron: 0 0 */4 * * *

0 comments on commit 9a9fd05

Please sign in to comment.