From 370cbfaaff21f97d71ce980d3cf0316fc80f914e Mon Sep 17 00:00:00 2001 From: Insub Kim Date: Thu, 5 Jun 2025 06:07:45 +0000 Subject: [PATCH] =?UTF-8?q?Install=20Dependencies=20and=20Build=20(SvelteK?= =?UTF-8?q?it)=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4780ad3..0a0c5ed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,13 +38,15 @@ pipeline { } } - stage('Install Dependencies and Build (SvelteKit)') { - steps { - sh 'npm install --prefix . --cache ${env.REMOTE_NPM_CACHE_DIR}' // Jenkins 에이전트에서 의존성 설치 - sh 'npm run build' // SvelteKit 빌드 (build 디렉토리 생성) - echo "SvelteKit project built successfully." - } + stage('Install Dependencies and Build (SvelteKit)') { + steps { + // Groovy 문자열 내에서 ${} 구문을 사용하여 Jenkins 환경 변수를 직접 삽입합니다. + // sh 명령은 이중 따옴표로 감싸서 Jenkins가 내부의 Groovy 변수를 먼저 치환하게 합니다. + sh "npm install --prefix . --cache ${env.REMOTE_NPM_CACHE_DIR}" + sh "npm run build" + echo "SvelteKit project built successfully." } + } stage('Determine Active Port') { steps {