diff --git a/Jenkinsfile b/Jenkinsfile index e69de29b..0280372f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -0,0 +1,32 @@ +pipeline{ + agent { + label 'apache' + } + + options{ + buildDiscarder(logRotator(numToKeepStr:'2',artifactNumToKeepStr:'1')) + } + + stages{ + + stage('build'){ + + steps{ + + sh 'ant -f build.xml -v' + } + + } + } + + + post{ + + always{ + archiveArtifacts artifacts: 'dist/*.jar', fingerprint: true + } + + } + + +} diff --git a/Jenkinsfile_01 b/Jenkinsfile_01 new file mode 100644 index 00000000..f6c3142a --- /dev/null +++ b/Jenkinsfile_01 @@ -0,0 +1,50 @@ +pipeline{ + agent none + + environment{ + + ENV_VAR='some_value' + + } + + stages{ + stage('build'){ + agent{ + label 'centos' + } + steps{ + echo 'building..' + } + stage('test'){ + agent docker + agent{ + docker 'openjdk:8u121-jre' + } + + steps{ + echo 'testing...' + } + } + + + + + + stage('deploy'){ + steps{ + echo 'deploying...' + } + } + } + + + post{ + + always{ + + archive 'dist/*.jar' + } + + } + +} diff --git a/test b/test new file mode 100644 index 00000000..e69de29b