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

Loading…
Cancel
Save