Curious if I can do something like what is below, essentially use parallel matrix to tack -P flags to the maven script. Is there a way to use parallel matrix to add different maven profiles and run the scripts in parallel? Or is there another way to do this without having the jobs separated? I want them coupled together in the pipeline.
test-e2e:
stage: test
script:
- |
mvn $MAVEN_CLI_OPTS test
parallel:
matrix:
- VERSION: [-Ptest1,-Ptest2]
Curious if I can do something like what is below, essentially use parallel matrix to tack -P flags to the maven script. Is there a way to use parallel matrix to add different maven profiles and run the scripts in parallel? Or is there another way to do this without having the jobs separated? I want them coupled together in the pipeline.
test-e2e:
stage: test
script:
- |
mvn $MAVEN_CLI_OPTS test
parallel:
matrix:
- VERSION: [-Ptest1,-Ptest2]
Share
Improve this question
asked Nov 19, 2024 at 20:49
himan01himan01
132 bronze badges
1
- 1 Why do you need those profiles? What is the purpose of them? Can you show your pom file? Which Maven version, JDK versio etc. do you use? – khmarbaise Commented Nov 20, 2024 at 7:23
1 Answer
Reset to default 0You can use the value specified in matrix as a regular environment variable:
test-e2e:
stage: test
script:
- |
mvn $MAVEN_CLI_OPTS test ${VERSION}
parallel:
matrix:
- VERSION: [-Ptest1,-Ptest2]
Note that this is just a syntactic sugar to reduce code duplication, so there is no special coupling between jobs.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742399501a4436622.html
评论列表(0条)