Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
863a141
feat: Create initial CI pipeline with build job
Aug 21, 2025
b6fc45e
chore: Update workflow name to trigger re-read
Aug 21, 2025
b328eb9
fix: Simplify workflow trigger to debug parsing issue
Aug 21, 2025
ce2ae17
Configure unit test and coverage test with report
Agligoglio Aug 26, 2025
30c5993
Initial empty commit
oo123code Aug 27, 2025
626dc23
feature/build-automation: Modified build files to build project succe…
oo123code Aug 27, 2025
faf944d
Fixed formatiing issues at gson/pom.xml (root directory)
oo123code Aug 27, 2025
5c0a31a
Merge pull request #1 from oo123code/feature/build-automation
24-Kwek-44 Aug 28, 2025
35c02ca
Merge branch 'main' into feature/ci-pipeline
Aug 28, 2025
c688282
ci: Add step to upload build artifact
Aug 28, 2025
b6b99f1
fix: Update upload-artifact action to v4
Aug 28, 2025
076c485
Merge pull request #2 from HONGJIE-666/feature-Loi_Unit-Testing
24-Kwek-44 Aug 28, 2025
2737aa8
Merge branch 'main' into feature/ci-pipeline
Aug 28, 2025
f78b46c
ci: Add test job to pipeline
Aug 28, 2025
f3b380a
fix: Use 'mvn install' to resolve JPMS module issue in test job
Aug 28, 2025
92de21d
fix: Use 'mvn verify' to satisfy Spotless check and run tests
Aug 28, 2025
e059c3e
style: Apply Spotless formatting to fix CI build
Aug 28, 2025
876f653
Add Dockerfile for deployment automation
TJ9659 Sep 3, 2025
2e91f02
Merge pull request #3 from 24-Kwek-44/feature/deployment-docker
24-Kwek-44 Sep 4, 2025
27aab29
style: Apply Spotless formatting to CI file
Sep 4, 2025
8f3f8a2
Merge branch 'main' into feature/ci-pipeline
Sep 4, 2025
93152eb
ci: Add deploy job to build Docker image
Sep 4, 2025
b6b2a27
style: Apply Spotless formatting after adding deploy job
Sep 4, 2025
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
57 changes: 57 additions & 0 deletions .github/workflows/assignment-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: UECS2s363 Assignment CI Pipeline v2

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build project with Maven
run: mvn -B verify --file pom.xml
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: gson-jar
path: gson/target/gson-*.jar

test:
Comment on lines +7 to +24

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Run unit tests with Maven
run: mvn -B verify
- name: Upload test reports
uses: actions/upload-artifact@v4
with:
name: test-reports
path: gson/target/surefire-reports/

deploy:
Comment on lines +25 to +43

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: gson-jar
path: gson/target/

- name: Build Docker image
run: docker build -t gson-app .
Comment on lines +44 to +57

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "interactive"
}
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM openjdk:17-jdk-slim

# Set the working directory inside the container
WORKDIR /app

# Copy the entire project into the container
COPY . .

# Install Maven and update package index
RUN apt-get update && apt-get install -y maven

# Apply formatting fixes first
RUN mvn spotless:apply

# Build without tests
RUN mvn clean install -DskipTests

# Default command to indicate deployment automation completed successfully
# Note: Project has no executable main method, so this is just a placeholder
CMD ["echo", "Deployment automation demonstrated"]
Loading