Skip to content

Commit

Permalink
Replace shell script with make
Browse files Browse the repository at this point in the history
  • Loading branch information
disa6302 committed Oct 15, 2020
1 parent e0811e2 commit 583b369
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
consumer: build

install-system-dependencies:
@echo "Installing system dependencies"

build: install-system-dependencies
@echo "Build java parser based consumer"
mvn package
# Create a temporary filename in /tmp directory
touch tmp_jar
# Create classpath string of dependencies from the local repository to a file
mvn -Dmdep.outputFile=tmp_jar dependency:build-classpath

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ExternalProject_Add(libawscpp-download
-DBUILD_DEPS=ON
-DBUILD_SHARED_LIBS=OFF
-DBUILD_ONLY=monitoring|logs
-DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
BUILD_ALWAYS TRUE
TEST_COMMAND ""
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include(ExternalProject)

ExternalProject_Add(libkvsProducerC-download
GIT_REPOSITORY https://github.com/awslabs/amazon-kinesis-video-streams-producer-c.git
GIT_TAG origin/master
GIT_TAG 22edebfd87f5a38ab8af58da9a42f3d8dc7aebe7
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX} -DBUILD_COMMON_LWS=ON -DBUILD_COMMON_CURL=ON -DBUILD_DEPENDENCIES=TRUE -DOPEN_SRC_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
BUILD_ALWAYS TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,6 @@ INT32 main(INT32 argc, CHAR* argv[])
RESET_INSTRUMENTED_ALLOCATORS();
DLOGI("CleanUp Done");
}
DLOGD("Exiting application with status code: 0x%08x", retStatus);
DLOGI("Exiting application with status code: 0x%08x", retStatus);
return STATUS_FAILED(retStatus) ? EXIT_FAILURE : EXIT_SUCCESS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import jenkins.model.*
WORKSPACE_PRODUCER="producer-c/producer-cloudwatch-integ"
WORKSPACE_CONSUMER="consumer-java/aws-kinesis-video-producer-sdk-canary-consumer"
GIT_URL='https://github.com/aws-samples/amazon-kinesis-video-streams-demos.git'
GIT_HASH='producer'
GIT_HASH='master'
RUNNER_JOB_NAME_PREFIX = "producer-runner"

// TODO: Set up configurability to run different parameter combinations
Expand Down
14 changes: 6 additions & 8 deletions producer-c/producer-cloudwatch-integ/jobs/runner.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,19 @@ def buildProducer() {
cd $WORKSPACE/producer-c/producer-cloudwatch-integ &&
mkdir -p build
cd build &&
sudo cmake .. &&
sudo make
cmake .. &&
make
"""
}

def buildConsumer(envs) {
withEnv(envs) {
sh '''
sh '''
PATH="$JAVA_HOME/bin:$PATH"
export PATH="$M2_HOME/bin:$PATH"
cd $WORKSPACE/consumer-java/aws-kinesis-video-producer-sdk-canary-consumer
mvn package
touch tmp_jar
mvn -Dmdep.outputFile=tmp_jar dependency:build-classpath
'''
make
'''
}
}

Expand Down Expand Up @@ -74,7 +72,7 @@ def runClient(isProducer, params) {
// TODO: Move to deletDir(). deleteDir() causes an exception right now
sh """
cd $WORKSPACE
sudo rm -rf *
rm -rf *
"""
}

Expand Down

0 comments on commit 583b369

Please sign in to comment.