From 39f3f2d351ae8998b81886123d32db0cbe7c2796 Mon Sep 17 00:00:00 2001 From: alpha Date: Fri, 20 Feb 2026 09:53:20 +0000 Subject: [PATCH 1/5] add jenkinsfile --- jenkinsfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 jenkinsfile diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 0000000..c010710 --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,34 @@ +pipeline { + agent { + docker { + image 'node:24-alpine' + } + } + + environment { + DB_HOST = 'localhost' + DB_USER = 'root' + DB_PASSWORD = 'password' + DB_NAME = 'my_database' + } + + +stages { + + stage ('install dependencies') { + steps { + sh 'node --version' + sh 'npm install' + sh 'npm install' + } + } + + stage ('start application') { + steps { + sh 'npm start' + } + +} + + +} \ No newline at end of file From dc0813188fccb319561e655f44b35fc2ce7f9d39 Mon Sep 17 00:00:00 2001 From: alpha Date: Fri, 20 Feb 2026 10:29:07 +0000 Subject: [PATCH 2/5] add Jenkinsfile --- jenkinsfile => Jenkinsfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename jenkinsfile => Jenkinsfile (100%) diff --git a/jenkinsfile b/Jenkinsfile similarity index 100% rename from jenkinsfile rename to Jenkinsfile From ad87f9634e325b80ae626dbaf84f7fbfd644e7f3 Mon Sep 17 00:00:00 2001 From: alpha Date: Fri, 20 Feb 2026 10:33:20 +0000 Subject: [PATCH 3/5] add Jenkinsfile --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index c010710..b2bb439 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,4 +31,7 @@ stages { } +} + + } \ No newline at end of file From 5ca397b5d8403ec8c496002babbc96ff8073cba6 Mon Sep 17 00:00:00 2001 From: alpha Date: Fri, 20 Feb 2026 10:42:18 +0000 Subject: [PATCH 4/5] add Jenkinsfile --- .gitignore | 3 +++ Jenkinsfile | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0a315ef..4cc019f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ node_modules/* *.log .idea/* *.backup +node_modules +.npm +.npm-cache \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index b2bb439..421d80e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,6 +10,8 @@ pipeline { DB_USER = 'root' DB_PASSWORD = 'password' DB_NAME = 'my_database' + + NPM_CONFIG_CACHE = "${WORKSPACE}/.npm-cache" } @@ -18,7 +20,7 @@ stages { stage ('install dependencies') { steps { sh 'node --version' - sh 'npm install' + sh 'rm -rf node_modules package-lock.json' sh 'npm install' } } From 6aa957b7d57bcd6d3198b6cca91850d17464767e Mon Sep 17 00:00:00 2001 From: alpha Date: Fri, 20 Feb 2026 10:43:43 +0000 Subject: [PATCH 5/5] add Jenkinsfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 7c1d0e9..f9056e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM node:18-alpine WORKDIR /back COPY ./package*.json . +COPY . . RUN npm install CMD npm install && npm start \ No newline at end of file