From dbeb202a8c51962dfdfa34ed78df9173fa159e42 Mon Sep 17 00:00:00 2001
From: dudgns2947 <dudgns2947@gmail.com>
Date: Thu, 21 Jul 2022 23:58:51 +0900
Subject: [PATCH] pipeline syntax modify7

---
 Jenkinsfile | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index c05db0d..0c95d26 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -3,13 +3,13 @@ pipeline {
     environment {
         userId = "KYH"
     }
-    stages {
-        stage('Prepare'){
+    @stages {
+        @stage('Prepare'){
             agent any
             steps {
                 checkout scm
             }
-        }post {
+        }@post {
             success{
                 echo 'prepare success'
             }
@@ -23,11 +23,11 @@ pipeline {
             }
         }
     }
-    stages('maven build'){
-        steps {
+    @stages('maven build'){
+        @steps {
             sh  'mvn package'
         }
-        post {
+        @post {
             success{
                 echo 'maven build success'
             }
@@ -37,7 +37,7 @@ pipeline {
                                     message: "\${env.userId} STARTED: Job '\${env.JOB_NAME} [\$(env.BUILD_NUMBER)]'(\${env.BUILD_URL})")
             }
         }
-        failure {
+        @failure {
             echo 'maven build failed'
         }
     }
-- 
GitLab