diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e40c6aef7..e775765f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,8 @@ jobs: with: fetch-depth: 0 - - name: Import Content Trust Key - run: cd build/ && ./assemble_api.jar.sh && ./prepare_release.sh + - name: Build and Test + run: cd build/ && ./assemble_api_jar.sh && ./run_all_tests.sh shell: bash - name: Codecov diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 40c67f1d6..3c53062ba 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -62,7 +62,7 @@ note you will have to generate a strong passphrase and save it in some password password=ignored-must-use-pinentry ``` -1. Add credenial configuration to global sbt setting in `~/.sbt/1.0/credential.sbt` with the content +1. Add credential configuration to global sbt setting in `~/.sbt/1.0/credential.sbt` with the content ``` credentials += Credentials(Path.userHome / ".sbt" / "1.0" / "vinyldns-gpg-credentials") @@ -70,14 +70,14 @@ note you will have to generate a strong passphrase and save it in some password ## Release Process -We are using sbt-release to run our release steps and auto-bump the version in `version.sbt`. The `bin/release.sh` +We are using sbt-release to run our release steps and auto-bump the version in `version.sbt`. The `build/release.sh` script will first run functional tests, then kick off `sbt release`, which also runs unit and integration tests before running the release 1. Follow [Docker Content Trust](#docker-content-trust) to setup a notary delegation for yourself 1. Follow [Sonatype Credentials](#sonatype-credentials) to setup the sonatype pgp signing key on your local 1. Make sure you're logged in to Docker with `docker login` -1. Run `utils/release.sh` _Note: the arg "skip-tests" will skip unit, integration and functional testing before a release_ +1. Run `build/release.sh` 1. You will be asked to confirm the version which originally comes from `version.sbt`. _NOTE: if the version ends with `SNAPSHOT`, then the docker latest tag won't be applied and the core module will only be published to the sonatype staging repo._ diff --git a/build/release.sh b/build/release.sh new file mode 100755 index 000000000..7ba6aaa0f --- /dev/null +++ b/build/release.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -euo pipefail +DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P) + +docker run -it --rm -e RUN_SERVICES=none -v "${DIR}/../:/build" vinyldns/build:base-build /bin/bash diff --git a/build/prepare_release.sh b/build/run_all_tests.sh similarity index 100% rename from build/prepare_release.sh rename to build/run_all_tests.sh