Combining pipeline and matrix

Dear All,

I want to build a pipeline with one task that is executed once and if this is successfull
the matrix should be build.

For example
build with jdk8 and deploy
if this is ok
matrix with JDK 9, 10 -> clean , test only

Cheers Sven

Sorry just found the other question…

one solution for me is the following:

workspace:
** base: /drone/src**
** path: rapidpm-functional-reactive**

pipeline:

** build:**
** image: ${JDK_VERSION}**
** pull: true**
** commands:**
** - mkdir /root/.m2**
** - cp /drone/src/rapidpm-functional-reactive/_data/nexus/settings.xml /root/.m2/settings.xml**
** - mvn clean**
** - mvn test**

** deploy:**
** image: ${JDK_VERSION}**
** pull: true**
** commands:**
** - mkdir /root/.m2**
** - cp /drone/src/rapidpm-functional-reactive/_data/nexus/settings.xml /root/.m2/settings.xml**
** - mvn clean**
** - mvn deploy**
** when:**
** matrix:**
** JDK_VERSION: maven:3.5-jdk-8-alpine**
** branches:**
** include: develop, release/***
** exclude: feature/***

matrix:
** JDK_VERSION:**
** - maven:latest**
** - maven:3.5-jdk-8-alpine**
** - maven:3.5-jdk-9**
** - svenruppert/maven-3.5-jdk-10**

See Only build after matrix

1 Like