From 7a061bd9589029d44b336d5e7c52cf53fd5675bc Mon Sep 17 00:00:00 2001 From: PrasadAthani <150219751+PrasadAthani@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:25:25 +0530 Subject: [PATCH] Create Jenkinsfile --- Jenkinsfile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..a753bbaf --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,33 @@ +pipeline { + agent any + stages { + stage('clean workspace'){ + steps{ + cleanWs() + } + } + stage('Checkout'){ + + steps{ + + // git branch: 'main', credentialsId: 'github-1', url: 'https://github.com/tekdi/shiksha-backend.git' + // checkout scmGit(branches: [[name: '*/oblf-21stFeb']], extensions: [], userRemoteConfigs: [[credentialsId: 'github-1', url: 'https://github.com/tekdi/shiksha-backend.git']]) + checkout scmGit(branches: [[name: '*/oblf-21stFeb']], extensions: [], userRemoteConfigs: [[credentialsId: 'github-1', url: 'https://github.com/tekdi/shiksha-frontend.git']]) + + echo "========================== ***Repository cloned Successfully*** ==========================" + + } + } + + stage ('Build&Deploy') { + + steps { + + sh 'yarn install' + sh 'yarn run build' + sh './scripts/pack-prod-build.sh' + } + } + + } +}