From 65e3168c32832a7a602cbd7d21ceaf63936e834f Mon Sep 17 00:00:00 2001 From: Randi Haboc Date: Mon, 14 Oct 2024 01:42:49 +0800 Subject: [PATCH 1/5] adding Jenkinsfile --- Jenkinsfile | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000000..0ddb8848631 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,52 @@ +pipeline { + agent any + + tools { + nodejs "NodeJS" // Reference to the NodeJS tool defined in Jenkins + } + + stages { + stage('Checkout') { + steps { + git 'https://github.com/your-username/create-react-app.git' // Replace with your repository URL + } + } + + stage('Install Dependencies') { + steps { + sh 'npm install' + } + } + + stage('Build') { + steps { + sh 'npm run build' + } + } + + stage('Test') { + steps { + sh 'npm test -- --watchAll=false' + } + } + + stage('Deploy') { + steps { + echo 'Deploying React app...' + // Add deployment steps here if necessary + } + } + } + + post { + always { + echo 'Pipeline finished.' + } + success { + echo 'Build successful!' + } + failure { + echo 'Build failed.' + } + } +} From 5fa3dafc44c54657dc9640633e7912ee2f9409f0 Mon Sep 17 00:00:00 2001 From: Randi Haboc Date: Mon, 14 Oct 2024 02:04:40 +0800 Subject: [PATCH 2/5] updating file --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0ddb8848631..ccb05a4e6d0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ pipeline { stages { stage('Checkout') { steps { - git 'https://github.com/your-username/create-react-app.git' // Replace with your repository URL + git 'https://github.com/randihaboc/create-react-app.git' // Replace with your repository URL } } From f12f24dfeee493d482be447bd0938024b1ff4ea3 Mon Sep 17 00:00:00 2001 From: Randi Haboc Date: Mon, 14 Oct 2024 02:36:14 +0800 Subject: [PATCH 3/5] updating file --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ccb05a4e6d0..2008c403f34 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ pipeline { stages { stage('Checkout') { steps { - git 'https://github.com/randihaboc/create-react-app.git' // Replace with your repository URL + git branch: 'main', url: 'https://github.com/randihaboc/create-react-app.git' // Replace with your repository URL } } From 080bc9206ee6946e06164954cb4f9491ca23c5ec Mon Sep 17 00:00:00 2001 From: yuancarlosss Date: Mon, 14 Oct 2024 23:04:18 +0800 Subject: [PATCH 4/5] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2008c403f34..f61a4e21b9a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ pipeline { stages { stage('Checkout') { steps { - git branch: 'main', url: 'https://github.com/randihaboc/create-react-app.git' // Replace with your repository URL + git branch: 'main', url: 'https://github.com/yuancarloss/create-react-app.git' // Replace with your repository URL } } From 09a3767de78f1841202fca60b293d77ee7ab3ed0 Mon Sep 17 00:00:00 2001 From: yuancarlosss Date: Mon, 14 Oct 2024 23:08:21 +0800 Subject: [PATCH 5/5] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f61a4e21b9a..1f3bd5e1b06 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ pipeline { stages { stage('Checkout') { steps { - git branch: 'main', url: 'https://github.com/yuancarloss/create-react-app.git' // Replace with your repository URL + git branch: 'main', url: 'https://github.com/yuancarlosss/create-react-app' // Replace with your repository URL } }