Skip to content

Commit

Permalink
ci: update pipelines
Browse files Browse the repository at this point in the history
Signed-off-by: Rifa Achrinza <[email protected]>
  • Loading branch information
achrinza committed Sep 2, 2021
1 parent 01898a9 commit 6944f18
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
27 changes: 13 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 6944f18

Please sign in to comment.