Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ebab5cd
update java & springboot version
HamzaAburaneh Feb 2, 2026
b244961
update vulnerable dependencies
HamzaAburaneh Feb 2, 2026
3e4c561
Implement proper logging with SLF4J
HamzaAburaneh Feb 2, 2026
3f75b7c
refactor: modernize Google Sheets API authentication
HamzaAburaneh Feb 2, 2026
dfbe2b8
feat: remove ml tags
HamzaAburaneh Feb 2, 2026
8dfdd1c
refactor: remove unused Airtable lookup tables and ML tags configuration
HamzaAburaneh Feb 2, 2026
79cb4b3
Refactor: CSV import methods to eliminate code duplication
HamzaAburaneh Feb 2, 2026
d7dd098
refactor: organize imports, use boolean primitive, and convert select…
HamzaAburaneh Feb 2, 2026
6bc02a1
refactor: extract URL and validation utilities into separate classes
HamzaAburaneh Feb 4, 2026
8c0daf0
refactor: move AirTableProblemEnhanced to model package
HamzaAburaneh Feb 4, 2026
9db2fa2
refactor: extract services from Main into dedicated service classes
HamzaAburaneh Feb 4, 2026
33897d1
refactor: simplify Main class and remove unused AirTable classes
HamzaAburaneh Feb 4, 2026
0cdad9e
build: add JAXB runtime dependency for Java 17+ compatibility
HamzaAburaneh Feb 4, 2026
0f34d96
chore: update PageSuccess JAR with BadWords service
HamzaAburaneh Feb 4, 2026
a946bc1
chore: exclude unnecessary JPA/Hibernate auto-configuration
HamzaAburaneh Feb 4, 2026
19911d2
fix: resolve PR review issues - HttpClient v5 compatibility and lifec…
HamzaAburaneh Feb 10, 2026
e9c1f8f
Update PageSuccess-0.0.1-SNAPSHOT.jar
HamzaAburaneh Feb 10, 2026
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
94 changes: 47 additions & 47 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,57 @@ name: Deploy to AKS Cluster
on:
push:
branches:
- master
- master
pull_request:
branches:
- master
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Decrypt large secret
run: ./scripts/decrypt.sh
env:
APPLICATION_PROPERTIES_PASSPHRASE: ${{ secrets.APPLICATION_PROPERTIES_PASSPHRASE }}

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Include local jar
run: mvn install:install-file -Dfile="lib/PageSuccess-0.0.1-SNAPSHOT.jar" -DgroupId="ca.gc.tbs" -DartifactId="PageSuccess" -Dversion="0.0.1-SNAPSHOT" -Dpackaging=jar -DgeneratePom=true

- name: Include local jar
run: mvn install:install-file -Dfile="lib/airtable.java-0.2.0.jar" -DgroupId="com.sybit" -DartifactId="airtable.java" -Dversion="0.2.0" -Dpackaging=jar -DgeneratePom=true

- name: Build with Maven
run: mvn install --file pom.xml

- uses: Azure/docker-login@v1
with:
login-server: tbsacr.azurecr.io
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}

- run: |
docker build -f ./docker/Dockerfile . -t tbsacr.azurecr.io/feedback-cj:${{ github.sha }}
docker push tbsacr.azurecr.io/feedback-cj:${{ github.sha }}

# Set the target AKS cluster.
- uses: Azure/aks-set-context@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
cluster-name: tbs-prod-aks
resource-group: tbs-prod-rg

- uses: Azure/k8s-deploy@v1
with:
manifests: |
kubernetes/feedback-cronjob.yml
images: |
tbsacr.azurecr.io/feedback-cj:${{ github.sha }}
namespace: |
pagesuccess
- uses: actions/checkout@master
- name: Decrypt large secret
run: ./scripts/decrypt.sh
env:
APPLICATION_PROPERTIES_PASSPHRASE: ${{ secrets.APPLICATION_PROPERTIES_PASSPHRASE }}

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"

- name: Include local jar
run: mvn install:install-file -Dfile="lib/PageSuccess-0.0.1-SNAPSHOT.jar" -DgroupId="ca.gc.tbs" -DartifactId="PageSuccess" -Dversion="0.0.1-SNAPSHOT" -Dpackaging=jar -DgeneratePom=true

- name: Include local jar
run: mvn install:install-file -Dfile="lib/airtable.java-0.2.0.jar" -DgroupId="com.sybit" -DartifactId="airtable.java" -Dversion="0.2.0" -Dpackaging=jar -DgeneratePom=true

- name: Build with Maven
run: mvn install --file pom.xml

- uses: Azure/docker-login@v1
with:
login-server: tbsacr.azurecr.io
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}

- run: |
docker build -f ./docker/Dockerfile . -t tbsacr.azurecr.io/feedback-cj:${{ github.sha }}
docker push tbsacr.azurecr.io/feedback-cj:${{ github.sha }}

# Set the target AKS cluster.
- uses: Azure/aks-set-context@v1
with:
creds: "${{ secrets.AZURE_CREDENTIALS }}"
cluster-name: tbs-prod-aks
resource-group: tbs-prod-rg

- uses: Azure/k8s-deploy@v1
with:
manifests: |
kubernetes/feedback-cronjob.yml
images: |
tbsacr.azurecr.io/feedback-cj:${{ github.sha }}
namespace: |
pagesuccess
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ hs_err_pid*
**/StoredCredential
.DS_Store

# Google Service Account Keys (plaintext - encrypted versions OK)
**/service-account.json
**/service-account.p12

pagefeedback-cj.iml
feedback-cj.iml
Feedback Tool.iml
Expand Down
4 changes: 1 addition & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM maven:3.8.6-openjdk-8-slim
RUN apt-get clean
RUN apt-get update
FROM eclipse-temurin:17-jre-alpine
RUN mkdir -p /app
COPY target/pagefeedback-cj-1.0.0-SNAPSHOT.jar /app/app.jar
ENV JAVA_OPTS="-Xmx2g"
Expand Down
Binary file modified lib/PageSuccess-0.0.1-SNAPSHOT.jar
Binary file not shown.
46 changes: 30 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.1.RELEASE</version>
<version>3.2.5</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<repositories>
<!-- <repository>
<id>bintray-maven</id>
Expand All @@ -28,7 +33,7 @@
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
<version>1.11.0</version>
</dependency>
<!-- Stanford CoreNLP -->
<dependency>
Expand All @@ -50,36 +55,38 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<version>2.15.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.4</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20160810</version>
<version>20240303</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.4</version>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
</dependency>
<!-- Required by Airtable library - TODO: Replace Airtable library with modern alternative -->
<dependency>
<groupId>com.mashape.unirest</groupId>
<artifactId>unirest-java</artifactId>
<version>1.4.9</version>
</dependency>
<!-- JAXB Runtime for Java 17+ (required by Stanford CoreNLP/jollyday) -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.9</version>
</dependency>
<dependency>
<groupId>com.sybit</groupId>
Expand All @@ -91,10 +98,17 @@
<artifactId>PageSuccess</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<!-- Google Sheets API Client -->
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-sheets</artifactId>
<version>v4-rev20210629-1.32.1</version>
<version>v4-rev20240826-2.0.0</version>
</dependency>
<!-- Modern Google Auth Library (replaces deprecated GoogleCredential) -->
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
<version>1.24.1</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
Expand All @@ -108,12 +122,12 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.9.0</version>
<version>1.11.0</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.15.3</version>
<version>1.18.3</version>
</dependency>
<dependency>
<groupId>uk.gov.service.notify</groupId>
Expand Down
4 changes: 3 additions & 1 deletion scripts/decrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ export GPG_TTY=$(tty)

ls ./src/main/resources

# Decrypt application properties
gpg --quiet --batch --yes --passphrase="$APPLICATION_PROPERTIES_PASSPHRASE" --output ./src/main/resources/application.properties --decrypt ./src/main/resources/application.properties.gpg

gpg --quiet --batch --yes --passphrase="$APPLICATION_PROPERTIES_PASSPHRASE" --output ./src/main/resources/service-account.p12 --decrypt ./src/main/resources/service-account.p12.gpg
# Decrypt Google service account JSON key (modern format)
gpg --quiet --batch --yes --passphrase="$APPLICATION_PROPERTIES_PASSPHRASE" --output ./src/main/resources/service-account.json --decrypt ./src/main/resources/service-account.json.gpg

ls ./src/main/resources
34 changes: 0 additions & 34 deletions src/main/java/ca/gc/tbs/AirTableMLTag.java

This file was deleted.

Loading