From e2ee74340a58a752015786c4f71814850b4a7d57 Mon Sep 17 00:00:00 2001 From: DinhVuHuan <127218228+DinhVuHuan@users.noreply.github.com> Date: Sun, 9 Mar 2025 16:25:33 +0700 Subject: [PATCH 1/5] Create Jenkinsfile test pipeline --- Jenkinsfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..cd5d438d6 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,16 @@ +pipeline { + agent any + stages { + stage('Checkout') { + steps { + echo "Đang lấy code từ GitHub..." + git 'https://github.com//spring-petclinic-microservices.git' + } + } + stage('Hello Jenkins') { + steps { + echo "Jenkins đang hoạt động!" + } + } + } +} From 78c5a099c80bad03b567e60feb106deb829e7c34 Mon Sep 17 00:00:00 2001 From: DinhVuHuan <127218228+DinhVuHuan@users.noreply.github.com> Date: Sun, 9 Mar 2025 16:32:19 +0700 Subject: [PATCH 2/5] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index cd5d438d6..200874ac0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ pipeline { stage('Checkout') { steps { echo "Đang lấy code từ GitHub..." - git 'https://github.com//spring-petclinic-microservices.git' + git 'https://github.com/DinhVuHuan/test_devopps.git' // URL phải đúng } } stage('Hello Jenkins') { From ac1abc17131820bb73bfb4b76c5ba3772489a3f7 Mon Sep 17 00:00:00 2001 From: DinhVuHuan <127218228+DinhVuHuan@users.noreply.github.com> Date: Sun, 9 Mar 2025 16:34:25 +0700 Subject: [PATCH 3/5] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 200874ac0..2d45b401d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ pipeline { stage('Checkout') { steps { echo "Đang lấy code từ GitHub..." - git 'https://github.com/DinhVuHuan/test_devopps.git' // URL phải đúng + git branch: 'main', url: 'https://github.com/DinhVuHuan/test_devopps.git' } } stage('Hello Jenkins') { From 237e2d1f64a39d49bd2859e2bea895a96f31cfac Mon Sep 17 00:00:00 2001 From: DinhVuHuan <127218228+DinhVuHuan@users.noreply.github.com> Date: Sun, 9 Mar 2025 17:05:44 +0700 Subject: [PATCH 4/5] Update Jenkinsfile --- Jenkinsfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2d45b401d..356e32fde 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,9 +7,16 @@ pipeline { git branch: 'main', url: 'https://github.com/DinhVuHuan/test_devopps.git' } } - stage('Hello Jenkins') { + stage('Test') { steps { - echo "Jenkins đang hoạt động!" + echo "Chạy unit test..." + sh './mvnw test' + } + } + stage('Build') { + steps { + echo "Build ứng dụng..." + sh './mvnw package' } } } From 7175e17002241a2ee544dcba66966f46e7059fec Mon Sep 17 00:00:00 2001 From: DinhVuHuan <127218228+DinhVuHuan@users.noreply.github.com> Date: Wed, 12 Mar 2025 19:24:56 +0700 Subject: [PATCH 5/5] Create test --- test | 1 + 1 file changed, 1 insertion(+) create mode 100644 test diff --git a/test b/test new file mode 100644 index 000000000..62367463a --- /dev/null +++ b/test @@ -0,0 +1 @@ +huhu