From f7b14ce81ef63fbf0dc5852100db2bb5c6412104 Mon Sep 17 00:00:00 2001 From: hyojeongchoi <63584457+hyojeongchoi@users.noreply.github.com> Date: Wed, 11 Oct 2023 01:37:17 +0900 Subject: [PATCH] ci: Add Jenkinsfile for build (#10) --- ci/hyojeongchoi/Jenkinsfile | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 ci/hyojeongchoi/Jenkinsfile diff --git a/ci/hyojeongchoi/Jenkinsfile b/ci/hyojeongchoi/Jenkinsfile new file mode 100644 index 0000000..620c670 --- /dev/null +++ b/ci/hyojeongchoi/Jenkinsfile @@ -0,0 +1,47 @@ +pipeline { + agent any + + triggers { + githubPush() + } + + stages { + + stage('github_clone') { + steps { + git branch: 'feature/10-hyojeongchoi', credentialsId: 'Iv1.03782133274a9841', url: 'https://github.com/GDSC-CUBIX/EZPZ-Infra-Study.git' + } + } + + stage('secrets.yml download') { + steps { + withCredentials([file(credentialsId: 'ci-secrets', variable: 'dbConfigFile')]) { + script { + sh 'cp $dbConfigFile dev/hyojeongchoi/ext-search-batch/src/test/resources/application-secrets.yml' + sh 'cp $dbConfigFile dev/hyojeongchoi/ext-search-batch/src/main/resources/application-secrets.yml' + } + } + } + } + + stage('Gradle build') { + steps { + dir('dev/hyojeongchoi/ext-search-batch'){ + sh """ + chmod +x ./gradlew + ./gradlew clean build + """ + } + } + } + } + + post { + success { + echo "Success to build Gradle" + } + failure { + echo "Failed to build Gradle." + } + } +} \ No newline at end of file