Browse Source

Fix streams quickstart in Jenkinsfile (#9285)

pull/9288/head
David Arthur 4 years ago committed by GitHub
parent
commit
12d98a3d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 47
      Jenkinsfile

47
Jenkinsfile vendored

@ -50,10 +50,7 @@ def doStreamsArchetype() {
|| { echo 'Could not install kafka-streams.jar (and dependencies) locally`'; exit 1; } || { echo 'Could not install kafka-streams.jar (and dependencies) locally`'; exit 1; }
''' '''
sh ''' VERSION = sh(script: 'grep "^version=" gradle.properties | cut -d= -f 2', returnStdout: true).trim()
version=`grep "^version=" gradle.properties | cut -d= -f 2` \
|| { echo 'Could not get version from `gradle.properties`'; exit 1; }
'''
dir('streams/quickstart') { dir('streams/quickstart') {
sh ''' sh '''
@ -61,29 +58,27 @@ def doStreamsArchetype() {
|| { echo 'Could not `mvn install` streams quickstart archetype'; exit 1; } || { echo 'Could not `mvn install` streams quickstart archetype'; exit 1; }
''' '''
sh ''' dir('test-streams-archetype') {
mkdir test-streams-archetype && cd test-streams-archetype \ // Note the double quotes for variable interpolation
|| { echo 'Could not create test directory for stream quickstart archetype'; exit 1; } sh """
''' echo "Y" | mvn archetype:generate \
-DarchetypeCatalog=local \
sh ''' -DarchetypeGroupId=org.apache.kafka \
echo "Y" | mvn archetype:generate \ -DarchetypeArtifactId=streams-quickstart-java \
-DarchetypeCatalog=local \ -DarchetypeVersion=${VERSION} \
-DarchetypeGroupId=org.apache.kafka \ -DgroupId=streams.examples \
-DarchetypeArtifactId=streams-quickstart-java \ -DartifactId=streams.examples \
-DarchetypeVersion=$version \ -Dversion=0.1 \
-DgroupId=streams.examples \ -Dpackage=myapps \
-DartifactId=streams.examples \ || { echo 'Could not create new project using streams quickstart archetype'; exit 1; }
-Dversion=0.1 \ """
-Dpackage=myapps \
|| { echo 'Could not create new project using streams quickstart archetype'; exit 1; }
'''
dir('streams.examples') { dir('streams.examples') {
sh ''' sh '''
mvn compile \ mvn compile \
|| { echo 'Could not compile streams quickstart archetype project'; exit 1; } || { echo 'Could not compile streams quickstart archetype project'; exit 1; }
''' '''
}
} }
} }
} }

Loading…
Cancel
Save