Skip to content

Commit

Permalink
Clean up the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
adejanovski committed Sep 28, 2023
1 parent 7711f22 commit c525dfe
Show file tree
Hide file tree
Showing 3 changed files with 489 additions and 501 deletions.
16 changes: 3 additions & 13 deletions .github/scripts/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ set -xe
mkdir -p src/packages

export VERSION=$(printf 'VER\t${project.version}' | mvn help:evaluate | grep '^VER' | cut -f2)

# Used for the docker image build
echo "SHADED_JAR=src/server/target/cassandra-reaper-${VERSION}.jar" >> $GITHUB_ENV

if [ "${GITHUB_REF}" = "refs/heads/arm64-images" ]
if [ "${GITHUB_REF}" = "refs/heads/master" ]
then
mkdir -p cassandra-reaper-master/server/target
cp -R src/packaging/bin cassandra-reaper-master/
Expand All @@ -38,15 +40,9 @@ then
tar czf cassandra-reaper-${VERSION}.tar.gz cassandra-reaper-master/
sudo mv cassandra-reaper-${VERSION}.tar.gz src/packages/
export GIT_HASH=$(git log --pretty=format:'%h' -n 1)
#docker login -u $DOCKER_USER -p $DOCKER_PASS
export REPO=thelastpickle/cassandra-reaper
echo "DOCKER_TAG1=$REPO:master" >> $GITHUB_ENV
echo "DOCKER_TAG2=$REPO:$GIT_HASH" >> $GITHUB_ENV
#mvn -B -pl src/server/ docker:build -Ddocker.directory=src/server/src/main/docker
#docker tag cassandra-reaper:latest $REPO:master
#docker push $REPO:master
#docker tag cassandra-reaper:latest $REPO:$GIT_HASH
#docker push $REPO:$GIT_HASH
fi
if [[ ${GITHUB_REF} == "refs/tags"* ]]
then
Expand All @@ -63,13 +59,7 @@ then
cd ../..
tar czf cassandra-reaper-${VERSION}-release.tar.gz cassandra-reaper-${VERSION}/
sudo mv cassandra-reaper-${VERSION}-release.tar.gz src/packages/
#docker login -u $DOCKER_USER -p $DOCKER_PASS
export REPO=thelastpickle/cassandra-reaper
echo "DOCKER_TAG1=$REPO:master" >> $GITHUB_ENV
echo "DOCKER_TAG2=$REPO:$VERSION" >> $GITHUB_ENV
#mvn -B -pl src/server/ docker:build -Ddocker.directory=src/server/src/main/docker
#docker tag cassandra-reaper:latest $REPO:latest
#docker push $REPO:latest
#docker tag cassandra-reaper:latest $REPO:$VERSION
#docker push $REPO:$VERSION
fi
3 changes: 2 additions & 1 deletion .github/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ case "${TEST_TYPE}" in
mvn -B package -DskipTests
docker-compose -f ./src/packaging/docker-build/docker-compose.yml build
docker-compose -f ./src/packaging/docker-build/docker-compose.yml run build
mvn -B -f src/server/pom.xml docker:build -Ddocker.directory=src/server/src/main/docker -DskipTests
VERSION=$(printf 'VER\t${project.version}' | mvn help:evaluate | grep '^VER' | cut -f2)
docker build --build-arg SHADED_JAR=cassandra-reaper-${VERSION}.jar -f src/server/src/main/docker/Dockerfile -t thelastpickle/cassandra-reaper:latest .
docker images

# Clear out Cassandra data before starting a new cluster
Expand Down
Loading

0 comments on commit c525dfe

Please sign in to comment.