lets enable CI and CD in the pipeline
* permissions and limitations under the License.
*/
@Library('github.com/fabric8io/fabric8-pipeline-library@master')
-def dummy
+def utils = new io.fabric8.Utils()
clientsTemplate{
mavenNode {
checkout scm
@@ -23,22 +23,35 @@ clientsTemplate{
sh "git remote set-url origin git@github.com:fabric8io/fabric8-maven-plugin.git"
def pipeline = load 'release.groovy'
+ if (utils.isCI()) {
- stage 'Stage'
- def stagedProject = pipeline.stage()
+ echo 'CI pipeline'
- stage 'Promote'
+ sh "mvn clean install"
+
+ } else if (utils.isCD()) {
+
+ def stagedProject
+
+ stage('Stage') {
+ stagedProject = pipeline.stage()
+ }
+
+ stage('Promote') {
pipeline.release(stagedProject)
+ }
// Disabled for now as it probably doesn't work because of the different directory structure
// with a dedicated doc-module
//stage 'Website'
//pipeline.website(stagedProject)
- stage 'Update downstream dependencies'
+ stage('Update downstream dependencies') {
pipeline.updateDownstreamDependencies(stagedProject)
}
}
+ }
+}
deployTemplate{
dockerNode {
