From 6944f188a924144f83486bab3eacaa0976cfbe13 Mon Sep 17 00:00:00 2001 From: Rifa Achrinza <25147899+achrinza@users.noreply.github.com> Date: Thu, 2 Sep 2021 18:21:14 +0800 Subject: [PATCH] ci: update pipelines Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com> --- .travis.yml | 27 +++++++++++++-------------- setup.sh | 4 ++-- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8d61085..57e82a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,18 @@ +branches: + only: master +arch: + - arm64 + - ppc64le language: node_js node_js: - 8 - 10 - 12 -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-5 - - oracle-java8-installer -before_install: - - sudo update-java-alternatives -s java-8-oracle - - export JAVA_HOME=/usr/lib/jvm/java-8-oracle - - java -version - - wget https://archive.apache.org/dist/cassandra/3.10/apache-cassandra-3.10-bin.tar.gz - - tar -xzf apache-cassandra-3.10-bin.tar.gz - - sudo sh apache-cassandra-3.10/bin/cassandra -R + - 14 + - 16 +services: docker +before_install: npm install --global npm +script: | + chmod +x ./setup.sh && \ + ./setup.sh && \ + npm test --ignore-scripts diff --git a/setup.sh b/setup.sh index ec5af50..b7725da 100644 --- a/setup.sh +++ b/setup.sh @@ -47,7 +47,7 @@ printf "\n${CYAN}Image successfully built.${PLAIN}\n" ## run the cassandra container printf "\n${RED}>> Starting the cassandra container${PLAIN} ${GREEN}...${PLAIN}" -CONTAINER_STATUS=$(docker run --name $CASSANDRA_CONTAINER -p $PORT:9042 -d cassandra:latest 2>&1) +CONTAINER_STATUS=$(docker run --name $CASSANDRA_CONTAINER -p $PORT:9042 -d cassandra:3.11 2>&1) if [[ "$CONTAINER_STATUS" == *"Error"* ]]; then printf "\n\n${CYAN}Status: ${PLAIN}${RED}Error starting container. Terminating setup.${PLAIN}\n\n" exit 1 @@ -82,7 +82,7 @@ while [ "$OUTPUT" -ne 0 ] && [ "$TIMEOUT" -gt 0 ] done if [ "$TIMEOUT" -le 0 ]; then - printf "\n\n${CYAN}Status: ${PLAIN}${RED}Failed to created keyspace. Terminating setup.${PLAIN}\n\n" + printf "\n\n${CYAN}Status: ${PLAIN}${RED}Failed to create keyspace. Terminating setup.${PLAIN}\n\n" exit 1 fi printf "\n${CYAN}Successfully created keyspace.${PLAIN}\n"