Skip to content

Commit

Permalink
Updated admin scripts for consistency and new release
Browse files Browse the repository at this point in the history
  • Loading branch information
tdl-jturner committed Aug 20, 2019
1 parent ccf2059 commit 0e49de0
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 56 deletions.
1 change: 1 addition & 0 deletions .admin/check_dependency_versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mvn versions:display-dependency-updates | grep '\->'
7 changes: 3 additions & 4 deletions .admin/docker
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ echo "Configure project"
echo "---------------------------------------------"
mkdir config
cat << EOF > config/application.properties
cassandraDriver.contactPoints=localhost
cassandraDriver.localDC=datacenter1
cassandraDriver.keyspace=$KEYSPACE
cassandraDriver.features.driverConfig=disabled
casquatch.basic.contact-points.0=localhost:9042
casquatch.basic.load-balancing-policy.local-datacenter=datacenter1
casquatch.basic.session-keyspace=$KEYSPACE
EOF
2 changes: 2 additions & 0 deletions .admin/jacoco
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mvn clean test -DCASQUATCH_LOG_LEVEL=TRACE jacoco:report-aggregate
open -a 'Google Chrome' ./casquatch-driver-tests/target/site/jacoco-aggregate/index.html
7 changes: 0 additions & 7 deletions .admin/package.sh

This file was deleted.

34 changes: 13 additions & 21 deletions .admin/release
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/sh
# Runs the release process



grep -q RELEASE pom.xml
grep "<version>" pom.xml | head -1 | grep -q "RELEASE"
if [ $? -ne 0 ]; then
echo "Current version is not *-RELEASE"
echo "Please run .admin/update_version.sh first"
echo "Please run .admin/update_version first"
exit 1;
fi

Expand All @@ -16,30 +14,24 @@ if [ $? -ne 0 ]; then
exit 1;
fi;

echo "Running full tests. Results in .admin/test.release.out and .admin/test.out"
.admin/full_test.sh > .admin/test.release.out

grep -q Failed .admin/test.release.out
if [ $? -eq 0 ]; then
echo "Tests failed. Verify results in .admin/test.release.out"
curl -s https://api.travis-ci.com/tmobile/casquatch.svg?branch=`git rev-parse --abbrev-ref HEAD` | grep -q pass
if [ $? -ne 0 ]; then
echo "Travis CI build is not passing"
exit 1;
fi

./update_manual
fi;

read -p "Please enter to stage for publishing"
git checkout -b tmp-release
git checkout master
git merge tmp-release
vi README.md
git commit README.md
.admin/update_manual
read -p "Press enter after updating any final release notes"
git commit -a
git branch -D tmp-release
mvn -pl cassandradriver -P release-sign-artifacts clean deploy
mvn -pl cassandradriver-ee -P release-sign-artifacts clean deploy
mvn -pl springconfigserver -P release-sign-artifacts clean deploy
mvn -pl cassandragenerator -P release-sign-artifacts clean deploy
export GPG_TTY=$(tty)
mvn -P release-sign-artifacts clean deploy
echo "Release is now staged (https://oss.sonatype.org/#nexus-search;quick~casquatch). You must manually do:"
echo "mvn -pl component -P release-sign-artifacts nexus-staging:release"
echo "mvn -P release-sign-artifacts nexus-staging:release"
echo "or"
echo "mvn -pl component -P release-sign-artifactsnexus-staging:drop"
echo "mvn -P release-sign-artifacts nexus-staging:drop"
echo "Finally run git push to push release changes to github"
18 changes: 18 additions & 0 deletions .admin/update_version
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
#
# Helper script to update the version number
#

OLD_VERSION=$1
NEW_VERSION=$2

sed -i .updaterelease "s/$OLD_VERSION/$NEW_VERSION/g" pom.xml
sed -i .updaterelease "s/$OLD_VERSION/$NEW_VERSION/g" */pom.xml
sed -i .updaterelease "s/$OLD_VERSION/$NEW_VERSION/g" casquatch-generator/src/main/resources/templates/pom.ftl
sed -i .updaterelease "s/$OLD_VERSION/$NEW_VERSION/g" casquatch-driver-tests/genmodels.sh
sed -i .updaterelease "s/$OLD_VERSION/$NEW_VERSION/g" casquatch-examples/*/pom.xml
sed -i .updaterelease "s/$OLD_VERSION/$NEW_VERSION/g" casquatch-examples/.setup.sh
sed -i .updaterelease "s/$OLD_VERSION/$NEW_VERSION/g" .admin/integration_tests
sed -i .updaterelease "s/$OLD_VERSION/$NEW_VERSION/g" manual/content/examples/*.md

find . -name '*.updaterelease' -exec rm {} \;
19 changes: 0 additions & 19 deletions .admin/update_version.sh

This file was deleted.

10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
script: mvn test
- stage: Integration Tests
name: Cassandra 3.0
script: .admin/integration_tests.sh cassandra:3.0
script: .admin/integration_tests cassandra:3.0
- name: Cassandra 3.11
script: .admin/integration_tests.sh cassandra:3.11
script: .admin/integration_tests cassandra:3.11
- name: DSE 5.1.15
script: .admin/integration_tests.sh datastax/dse-server:5.1.15
script: .admin/integration_tests datastax/dse-server:5.1.15
- name: DSE 6.0.8
script: .admin/integration_tests.sh datastax/dse-server:6.0.8
script: .admin/integration_tests datastax/dse-server:6.0.8
- name: DSE 6.7.3
script: .admin/integration_tests.sh datastax/dse-server:6.7.3
script: .admin/integration_tests datastax/dse-server:6.7.3

0 comments on commit 0e49de0

Please sign in to comment.