From 74b2e5cf5a9a58d2e334a0589ce9324de088bb44 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 1 Feb 2023 06:39:01 +0000 Subject: [PATCH] environment test --- Jenkinsfile | 67 ----------------------------------------------------- 1 file changed, 67 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ad5b77b..d8ce430 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,22 +2,6 @@ pipeline { agent any // 사용 가능한 에이전트에서 이 파이프라인 또는 해당 단계를 실행 stages { - stage('Prepare') { - steps { - git branch: 'master', - url: 'https://github.com/mooh2jj/docker-jenkins-pipeline-test2.git' - } - - post { - success { - sh 'echo "Successfully Cloned Repository"' - } - failure { - sh 'echo "Fail Cloned Repository"' - } - } - } - stage('Build') { steps { // gralew이 있어야됨. git clone해서 project를 가져옴. @@ -42,56 +26,5 @@ pipeline { echo '테스트 단계와 관련된 몇 가지 단계를 수행합니다.' } } - stage('Docker Rm') { - steps { - sh 'echo "Docker Rm Start"' - sh """ - docker stop docker-jenkins-pipeline-test2 - docker rm docker-jenkins-pipeline-test2 - docker rmi -f mooh2jj/docker-jenkins-pipeline-test2 - """ - } - - post { - success { - sh 'echo "Docker Rm Success"' - } - failure { - sh 'echo "Docker Rm Fail"' - } - } - } - - stage('Dockerizing'){ - steps{ - sh 'echo " Image Bulid Start"' - sh 'docker build . -t mooh2jj/docker-jenkins-pipeline-test2' - } - post { - success { - sh 'echo "Bulid Docker Image Success"' - } - - failure { - sh 'echo "Bulid Docker Image Fail"' - } - } - } - - stage('Deploy') { - steps { - sh 'docker run --name docker-jenkins-pipeline-test2 -d -p 8083:8083 mooh2jj/docker-jenkins-pipeline-test2' - } - - post { - success { - echo 'success' - } - - failure { - echo 'failed' - } - } - } } } \ No newline at end of file