Skip to content

Latest commit

 

History

History
139 lines (99 loc) · 2.49 KB

RELEASES.MD

File metadata and controls

139 lines (99 loc) · 2.49 KB

Deployment

1. Git

  • Start the agent
eval "$(ssh-agent -s)"
  • Check key is available
ssh-add -l
  • Add the key (if needed)
cd ~/.ssh
ssh-add githubff4j

2. Update versions and dependencies

  • Check for dependency updates and update the pom.xml file when relevant.
mvn versions:display-dependency-update
  • Update project version
mvn versions:set -DnewVersion=0.4
  • When ok commit
mvn versions:commit
  • Make sure everything is in sync
find . -type f -name *.DS_Store -ls -delete
git pull
git add -A
git commit -m "Preparing for deployment"

3. Build and Tests

  • Generate Jacoco report and push to Coverall and get results at Coveralls.io
mvn clean test jacoco:report coveralls:report
  • Generate Sonar report and push to sonar cloud and get results at SonarCloud.io
export SONAR_TOKEN=...
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=clun_astra-cli

4. Packaging

  • Install proper java and graal VM if needed
sdk install java 22.3.1.r17-grl
java --version
  • Build project
mvn clean install
  • Check reflect-config.json and resource-config.json are updated with all classes and commands
{
    "name":"com.dtsx.astra.cli.org.OrgIdCmd",
    "allDeclaredFields":true,
    "methods":[{"name":"<init>","parameterTypes":[] }]
}
  • Build project a native image
mvn clean install -Pnative
  • Chmod everything execution files
chmod 755 src/main/dist/astra-init.sh
  • Copy dist/astra-init.sh (generated by a test) on each distribution folder

  • Copy the shaded and put it in Java folder, rename to astra-cli.jar

  • Packaging

export ASTRA_CLI_VERSION=0.5
tar -czf astra-cli-0.5-x86_64_linux.bottle.tar.gz *
zip astra-cli-$ASTRA_CLI_VERSION-linux.zip *
zip astra-cli-0.4.zip *
zip astra-cli-0.4-linux.zip *
zip astra-cli-0.5-mac.zip *
tar -czf astra-cli-0.4-homebrew.tar.gz *
brew create https://github.com/datastax/astra-cli/releases/download/0.4/astra-cli-0.4-homebrew.tar.gz
  • Edit Releases
https://github.com/datastax/astra-cli/releases

Homebrew

export ASTRA_CLI_VERSION=0.5
tar -czf astra-cli-$ASTRA_CLI_VERSION.x86_64_linux.bottle.tar.gz *
shasum -a 256 astra-cli-$ASTRA_CLI_VERSION.x86_64_linux.bottle.tar.gz
zip astra-cli-$ASTRA_CLI_VERSION-linux.zip *