From 2554bf867e607dce9d681474340a997df9bea9e4 Mon Sep 17 00:00:00 2001 From: Gavin Date: Sat, 11 Jun 2022 11:57:27 -0700 Subject: [PATCH 1/9] Delete unused exceptions --- .../exceptions/DBAuthorizationException.java | 16 ---------------- .../UninitializedWorkspaceDBException.java | 16 ---------------- 2 files changed, 32 deletions(-) delete mode 100644 src/us/kbase/workspace/database/exceptions/DBAuthorizationException.java delete mode 100644 src/us/kbase/workspace/database/exceptions/UninitializedWorkspaceDBException.java diff --git a/src/us/kbase/workspace/database/exceptions/DBAuthorizationException.java b/src/us/kbase/workspace/database/exceptions/DBAuthorizationException.java deleted file mode 100644 index fc7b3948d..000000000 --- a/src/us/kbase/workspace/database/exceptions/DBAuthorizationException.java +++ /dev/null @@ -1,16 +0,0 @@ -package us.kbase.workspace.database.exceptions; - -/** - * Thrown when authorization to a database is denied. - * @author gaprice@lbl.gov - * - */ -public class DBAuthorizationException extends WorkspaceDBException { - - private static final long serialVersionUID = 1L; - - public DBAuthorizationException() { super(); } - public DBAuthorizationException(String message) { super(message); } - public DBAuthorizationException(String message, Throwable cause) { super(message, cause); } - public DBAuthorizationException(Throwable cause) { super(cause); } -} diff --git a/src/us/kbase/workspace/database/exceptions/UninitializedWorkspaceDBException.java b/src/us/kbase/workspace/database/exceptions/UninitializedWorkspaceDBException.java deleted file mode 100644 index 377999f10..000000000 --- a/src/us/kbase/workspace/database/exceptions/UninitializedWorkspaceDBException.java +++ /dev/null @@ -1,16 +0,0 @@ -package us.kbase.workspace.database.exceptions; - -/** - * Thrown when the workspace database isn't properly initialized. - * @author gaprice@lbl.gov - * - */ -public class UninitializedWorkspaceDBException extends WorkspaceDBException { - - private static final long serialVersionUID = 1L; - - public UninitializedWorkspaceDBException() { super(); } - public UninitializedWorkspaceDBException(String message) { super(message); } - public UninitializedWorkspaceDBException(String message, Throwable cause) { super(message, cause); } - public UninitializedWorkspaceDBException(Throwable cause) { super(cause); } -} From 59633907b888fef3124bd2dd85273b638da3dcbe Mon Sep 17 00:00:00 2001 From: bio-boris Date: Fri, 17 Jun 2022 14:51:59 -0500 Subject: [PATCH 2/9] Create release-main.yml --- .github/workflows/release-main.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/release-main.yml diff --git a/.github/workflows/release-main.yml b/.github/workflows/release-main.yml new file mode 100644 index 000000000..a25467818 --- /dev/null +++ b/.github/workflows/release-main.yml @@ -0,0 +1,25 @@ +--- +name: Release - Build & Push Image +on: + release: + branches: + - main + - master + types: [ published ] +jobs: + check-source-branch: + uses: kbase/.github/.github/workflows/reusable_validate-branch.yml@main + with: + build_branch: '${{ github.event.release.target_commitish }}' + validate-release-tag: + needs: check-source-branch + uses: kbase/.github/.github/workflows/reusable_validate-release-tag.yml@main + with: + release_tag: '${{ github.event.release.tag_name }}' + build-push: + needs: validate-release-tag + uses: kbase/.github/.github/workflows/reusable_build-push.yml@main + with: + name: '${{ github.event.repository.name }}' + tags: '${{ github.event.release.tag_name }},latest' + secrets: inherit From eabea8e890f122e0e2dbbe955ce607c14fd4d4ce Mon Sep 17 00:00:00 2001 From: bio-boris Date: Fri, 17 Jun 2022 14:52:53 -0500 Subject: [PATCH 3/9] Delete .github/workflows/scripts directory Delete unneeded dirs --- .github/workflows/scripts/build_prodrc_pr.sh | 16 --------- .github/workflows/scripts/build_test_pr.sh | 17 ---------- .github/workflows/scripts/deploy_tag.sh | 34 ------------------- .github/workflows/scripts/tag_environments.sh | 22 ------------ .github/workflows/scripts/tag_prod_latest.sh | 12 ------- .github/workflows/scripts/tag_test_latest.sh | 12 ------- 6 files changed, 113 deletions(-) delete mode 100755 .github/workflows/scripts/build_prodrc_pr.sh delete mode 100755 .github/workflows/scripts/build_test_pr.sh delete mode 100755 .github/workflows/scripts/deploy_tag.sh delete mode 100755 .github/workflows/scripts/tag_environments.sh delete mode 100755 .github/workflows/scripts/tag_prod_latest.sh delete mode 100755 .github/workflows/scripts/tag_test_latest.sh diff --git a/.github/workflows/scripts/build_prodrc_pr.sh b/.github/workflows/scripts/build_prodrc_pr.sh deleted file mode 100755 index d888fc9d6..000000000 --- a/.github/workflows/scripts/build_prodrc_pr.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/env bash - -export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') -export MY_APP=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}') -export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -export COMMIT=$(echo "$SHA" | cut -c -7) - -docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" ghcr.io -docker build --build-arg BUILD_DATE="$DATE" \ - --build-arg COMMIT="$COMMIT" \ - --build-arg BRANCH="$GITHUB_HEAD_REF" \ - --build-arg PULL_REQUEST="$PR" \ - --label us.kbase.vcs-pull-req="$PR" \ - -t ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" . -docker push ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" diff --git a/.github/workflows/scripts/build_test_pr.sh b/.github/workflows/scripts/build_test_pr.sh deleted file mode 100755 index 546b1b422..000000000 --- a/.github/workflows/scripts/build_test_pr.sh +++ /dev/null @@ -1,17 +0,0 @@ -#! /usr/bin/env bash - -export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') -export MY_APP=$(echo $(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}')"-develop") -export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -export COMMIT=$(echo "$SHA" | cut -c -7) - -echo $DOCKER_TOKEN | docker login ghcr.io -u $DOCKER_ACTOR --password-stdin -docker build --build-arg BUILD_DATE="$DATE" \ - --build-arg COMMIT="$COMMIT" \ - --build-arg BRANCH="$GITHUB_HEAD_REF" \ - --build-arg PULL_REQUEST="$PR" \ - --label us.kbase.vcs-pull-req="$PR" \ - -t ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" . -docker push ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" - \ No newline at end of file diff --git a/.github/workflows/scripts/deploy_tag.sh b/.github/workflows/scripts/deploy_tag.sh deleted file mode 100755 index 5fb928ab4..000000000 --- a/.github/workflows/scripts/deploy_tag.sh +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env bash - -# Usage: ./deploy_tag.sh -e TARGET -o ORG -r REPO -s DEV_PROD -t IMAGE_TAG -# -# Example 1: ./deploy_tag.sh -o "kbase" -r "narrative-traefiker" -s "dev" -t "pr-9001" -e "ci" -# Example 2: ./deploy_tag.sh -o "kbase" -r "narrative" -s "prod" -t "latest" -e "next" -# -# Where: -# -o ORG is the organization (`kbase`, `kbaseapps`, etc.) -# -r REPO is the repository (e.g. `narrative`) -# -s DEV_PROD determines whether to pull the development {APPNAME}-develop or production {APPNAME} image. -# -t IMAGE_TAG is the *current* Docker image tag, typically `pr-#` or `latest` -# -e TARGET is one of: `appdsshev`, `ci`, or `next` -# -# Be sure to set $TOKEN first! -# See: https://docs.github.com/en/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images#authenticating-with-the-container-registry - - -while getopts e:o:r:s:t: option - do - case "${option}" - in - e) TARGET=${OPTARG};; - o) ORG=${OPTARG};; - r) REPO=${OPTARG};; - s) DEV_PROD=${OPTARG};; - t) IMAGE_TAG=${OPTARG};; - esac -done - -curl -H "Authorization: token $TOKEN" \ - -H 'Accept: application/vnd.github.everest-preview+json' \ - "https://api.github.com/repos/$ORG/$REPO/dispatches" \ - -d '{"event_type":"Tag '"$DEV_PROD"' '"$IMAGE_TAG"' for '"$TARGET"'", "client_payload": {"image_tag": "'"$IMAGE_TAG"'","target": "'"$TARGET"'","dev_prod": "'"$DEV_PROD"'"}}' diff --git a/.github/workflows/scripts/tag_environments.sh b/.github/workflows/scripts/tag_environments.sh deleted file mode 100755 index b39732a09..000000000 --- a/.github/workflows/scripts/tag_environments.sh +++ /dev/null @@ -1,22 +0,0 @@ - -#! /usr/bin/env bash -# Add vars for PR & environments to yaml, as called from external script - -export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') -export MY_APP=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}') -export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -export COMMIT=$(echo "$SHA" | cut -c -7) - -if [ $DEV_PROD = "dev" ] || [ $DEV_PROD = "develop" ] -then - IMAGE=$MY_APP"-develop" -else - IMAGE=$MY_APP -fi - -echo "Dev or Prod:" $DEV_PROD -docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" ghcr.io -docker pull ghcr.io/"$MY_ORG"/"$IMAGE":"$IMAGE_TAG" -docker tag ghcr.io/"$MY_ORG"/"$IMAGE":"$IMAGE_TAG" ghcr.io/"$MY_ORG"/"$IMAGE":"$TARGET" -docker push ghcr.io/"$MY_ORG"/"$IMAGE":"$TARGET" diff --git a/.github/workflows/scripts/tag_prod_latest.sh b/.github/workflows/scripts/tag_prod_latest.sh deleted file mode 100755 index 1390fd16f..000000000 --- a/.github/workflows/scripts/tag_prod_latest.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/bin/env bash - -export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') -export MY_APP=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}') -export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -export COMMIT=$(echo "$SHA" | cut -c -7) - -docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" ghcr.io -docker pull ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" -docker tag ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" ghcr.io/"$MY_ORG"/"$MY_APP":"latest" -docker push ghcr.io/"$MY_ORG"/"$MY_APP":"latest" diff --git a/.github/workflows/scripts/tag_test_latest.sh b/.github/workflows/scripts/tag_test_latest.sh deleted file mode 100755 index c0dc504a0..000000000 --- a/.github/workflows/scripts/tag_test_latest.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/bin/env bash - -export MY_ORG=$(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $1}') -export MY_APP=$(echo $(echo "${GITHUB_REPOSITORY}" | awk -F / '{print $2}')"-develop") -export DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -export COMMIT=$(echo "$SHA" | cut -c -7) - -docker login -u "$DOCKER_ACTOR" -p "$DOCKER_TOKEN" ghcr.io -docker pull ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" -docker tag ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" ghcr.io/"$MY_ORG"/"$MY_APP":"latest" -docker push ghcr.io/"$MY_ORG"/"$MY_APP":"latest" From ba44533a46f9c6ba9c85eda2e139f3e7ca4c8db2 Mon Sep 17 00:00:00 2001 From: bio-boris Date: Fri, 17 Jun 2022 14:56:34 -0500 Subject: [PATCH 4/9] Delete .github/workflows directory --- .github/workflows/ReleaseCycleProposal.md | 95 ----------------------- .github/workflows/build_prodrc_pr.yaml | 27 ------- .github/workflows/build_test_pr.yaml | 27 ------- .github/workflows/release-main.yml | 25 ------ .github/workflows/tag_environments.yaml | 19 ----- .github/workflows/tag_prod_latest.yaml | 26 ------- .github/workflows/tag_test_latest.yaml | 26 ------- 7 files changed, 245 deletions(-) delete mode 100644 .github/workflows/ReleaseCycleProposal.md delete mode 100644 .github/workflows/build_prodrc_pr.yaml delete mode 100644 .github/workflows/build_test_pr.yaml delete mode 100644 .github/workflows/release-main.yml delete mode 100644 .github/workflows/tag_environments.yaml delete mode 100644 .github/workflows/tag_prod_latest.yaml delete mode 100644 .github/workflows/tag_test_latest.yaml diff --git a/.github/workflows/ReleaseCycleProposal.md b/.github/workflows/ReleaseCycleProposal.md deleted file mode 100644 index e4c554c9e..000000000 --- a/.github/workflows/ReleaseCycleProposal.md +++ /dev/null @@ -1,95 +0,0 @@ -## New PR & Testing Process Proposal - - -### Goals - -Design a development process and write related automation that: - -1. Allows for rapid parallel development -1. Prevents cross-developer collisions -1. Creates a full audit trail of all changes, tests, and deployments -1. Tests small changes (features and bug fixes) individually -1. Can be enabled on most repos with little to no modification -1. Provides multiple test/check points througout the development process including: - - Build tests that are created at the beginning of the code review (PR) process _pre_-merge - - Images that can be tested both before and after merges to the `develop` branch - - Release candidate images that can be tested prior to production releases (aka merges to `master`) -1. Reduces excessive or redundant build testing through the use of Draft/WIP pull requests -1. Enables manual build triggering as needed through the Draft/WIP vs. "Ready for Review" pull requests -1. Allows for easy ad-hoc deployment of images to any environment (assuming above safeguards are in place) -1. Provides a basis for potential future continuous deployment - -### Process - -(Will start at the end of the cycle, as it oddly makes things more clear) - -#### Release Cycle Pt. 1: - -- An official "release" (version bump) is merged from develop to master. -- The production Docker image `:latest` is then updated and pushed to GitHub Packages. -- After this release update is complete, a new Draft/WIP PR for the next release is created (again a merge from develop to master). - -#### Development Cycle: - -- Once development on a new release begins, developers create their short-lived feature branches off of develop. -- Once their feature is complete, they create a new PR to merge from their feature branch to develop. -- When the PR is created, an `:pr#` image is autodamically built uploaded to GitHub Packages. - - Note that this image is intentionally separate from the prod `` image. -- (Optional) - After the `-develop:pr#` image build & upload is complete, some process (PR labeling or a PR comment) "enables" this image to be tested in appdev, ci, and/or next. -- Through some process, we test the image in these environments. - - Note that if we simply use the `-develop:pr#` nomenclature, the above "test environment enabling" may not be needed. - - Simply specifying which PR# tag you want to pull in each environment would suffice. -- Once all testing is complete, the code is merged to develop. - -#### Release Cycle Pt. 2 - -- Once all development for a release is complete, the aforementioned "Release PR" (aka the long-running Draft/WIP PR that will merge from develop to master) is taken out of WIP/Draft mode. -- Taking the Release PR out of Draft/WIP will trigger one final build test from the develop branch. -- Once this image has passed the initial build test, the repo owner can merge the Release PR to master. -- Once merged, the final build image will be uploaded to the prod `:latest` image. -- Process starts again by creating a new Draft/WIP Release PR for the next release. - -### Discussion - -#### Process Advantages - -- Using the `-develop:pr#` naming scheme allows us to test multiple feature improvements at will, allowing for higher velocity development. -- Separating features in this way allows us to run build tests on smaller changes, reducing errors. -- The final Release PR build ensures that the final production image still builds correctly without error. -- Keeping separate prod & `-develop` images allows us to pull development, pre-release (release candidate), and production images at will. -- Note that although the `-develop` image will have a fair number of tags (one per PR), it's extremely easy to pull the correct test image by simply specifying the `:pr-#` tag. - - -#### Image Naming - - -| Environment | Image | Contains | Note | -| ----------- | ----------- |----------- |----------- | -| Dev | _appname_-develop:pr-## | Pre-merge dev PR build| \*See `Improvements` section| -| Pre-Stage | _appname_-develop:latest | Latest post-mere dev PR build | | -| Stage | _appname_:pr-## | Pre-merge dev -> master release candidate | | -| Prod | _appname_:latest | Production (post-merge master) build | | - -#### Deployment - -Our current process of deploying to active environmets (appdev, ci, next, & prod) utilizes Docker image tags. - -To implement this tagging in the new process, a workflow script is being developed to trigger retags of the above images (typically just the `:latest` test and prod images) manually via an web hook. This hook can be triggered by an internal (behind the firewall): - -- CI tool like Jenkins -- Chatops bot connected to Slack -- Other tool such as Postman - -#### Improvements - -This builds on the Deployment section above... - -- \*Currently pulling a specific `development` build (pre-merge) woul require going into the Rancher UI and updating the `_appname_-develop:pr-##` number to reflect the PR you wish to test. - - This is fine as an MVP, given the core devs have access to our Appdev Rancher cluster. - - For future Rancher environments, it is possible that fewer devs will have direct access, neccessitating some improvements to the process. -- A potential improvement might be to implement a bit of "chat-ops": - - When a new PR build completes, a notification is posted in the related Slack channel (e.g. \#narrative-build). - - _Only_ devs who can update the dev enviroment are members of this locked channel. - - Once a PR build notification is posted, one of the devs/devops members can deploy with something like `.appdev deploy pr-##`. - - A chat bot in _our_ infrastructure would listen for these chatops commands and use Rancher's API to update the image url (`_appname_-develop:pr-##`) and reload the service in question. -- Depending on the difficulty of deploying multiple frontends (in the case of `narrative`) to connect to the same appdev backend, it could be possible to test multiple PRs simultaneously, using URLs like `pr##.appdev.kbase.us`. :shrug: diff --git a/.github/workflows/build_prodrc_pr.yaml b/.github/workflows/build_prodrc_pr.yaml deleted file mode 100644 index ca5c715cf..000000000 --- a/.github/workflows/build_prodrc_pr.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Build Prod RC Image -'on': - pull_request: - branches: - - master - types: - - opened - - synchronize - - ready_for_review -jobs: - docker_build: - runs-on: ubuntu-latest - steps: - - name: Check out GitHub Repo - if: github.event.pull_request.draft == false - with: - ref: "${{ github.event.pull_request.head.sha }}" - uses: actions/checkout@v2 - - name: Build and Push to Packages - if: github.event.pull_request.draft == false - env: - PR: "${{ github.event.pull_request.number }}" - SHA: "${{ github.event.pull_request.head.sha }}" - DOCKER_ACTOR: "jsfillman" - DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}" - run: "./.github/workflows/scripts/build_prodrc_pr.sh\n" diff --git a/.github/workflows/build_test_pr.yaml b/.github/workflows/build_test_pr.yaml deleted file mode 100644 index 377de965f..000000000 --- a/.github/workflows/build_test_pr.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Build Test Image -'on': - pull_request: - branches: - - develop - types: - - opened - - synchronize - - ready_for_review -jobs: - docker_build: - runs-on: ubuntu-latest - steps: - - name: Check out GitHub Repo - if: github.event.pull_request.draft == false - with: - ref: "${{ github.event.pull_request.head.sha }}" - uses: actions/checkout@v2 - - name: Build and Push to Packages - if: github.event.pull_request.draft == false - env: - PR: "${{ github.event.pull_request.number }}" - SHA: "${{ github.event.pull_request.head.sha }}" - DOCKER_ACTOR: "jsfillman" - DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}" - run: "./.github/workflows/scripts/build_test_pr.sh\n" diff --git a/.github/workflows/release-main.yml b/.github/workflows/release-main.yml deleted file mode 100644 index a25467818..000000000 --- a/.github/workflows/release-main.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: Release - Build & Push Image -on: - release: - branches: - - main - - master - types: [ published ] -jobs: - check-source-branch: - uses: kbase/.github/.github/workflows/reusable_validate-branch.yml@main - with: - build_branch: '${{ github.event.release.target_commitish }}' - validate-release-tag: - needs: check-source-branch - uses: kbase/.github/.github/workflows/reusable_validate-release-tag.yml@main - with: - release_tag: '${{ github.event.release.tag_name }}' - build-push: - needs: validate-release-tag - uses: kbase/.github/.github/workflows/reusable_build-push.yml@main - with: - name: '${{ github.event.repository.name }}' - tags: '${{ github.event.release.tag_name }},latest' - secrets: inherit diff --git a/.github/workflows/tag_environments.yaml b/.github/workflows/tag_environments.yaml deleted file mode 100644 index 8a8a70bb5..000000000 --- a/.github/workflows/tag_environments.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: Tag Image For Deploy -'on': - repository_dispatch -jobs: - tag_environments: - runs-on: ubuntu-latest - steps: - - name: Check out GitHub Repo - uses: actions/checkout@v2 - - name: Tag Deploy Environments - env: - DOCKER_ACTOR: jsfillman - DOCKER_TOKEN: ${{ secrets.GHCR_TOKEN }} - IMAGE_TAG: ${{ github.event.client_payload.image_tag }} - SHA: ${{ github.event.pull_request.head.sha }} - TARGET: ${{ github.event.client_payload.target }} - DEV_PROD: ${{ github.event.client_payload.dev_prod }} - run: './.github/workflows/scripts/tag_environments.sh' diff --git a/.github/workflows/tag_prod_latest.yaml b/.github/workflows/tag_prod_latest.yaml deleted file mode 100644 index 10de45fc2..000000000 --- a/.github/workflows/tag_prod_latest.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: Tag Prod Latest -'on': - pull_request: - branches: - - master - types: - - closed -jobs: - docker_tag: - runs-on: ubuntu-latest - steps: - - name: Check out GitHub Repo - if: github.event_name == 'pull_request' && github.event.action == 'closed' && - github.event.pull_request.merged == true - with: - ref: "${{ github.event.pull_request.head.sha }}" - uses: actions/checkout@v2 - - name: Build and Push to Packages - if: github.event.pull_request.draft == false - env: - PR: "${{ github.event.pull_request.number }}" - SHA: "${{ github.event.pull_request.head.sha }}" - DOCKER_ACTOR: "jsfillman" - DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}" - run: "./.github/workflows/scripts/tag_prod_latest.sh\n" diff --git a/.github/workflows/tag_test_latest.yaml b/.github/workflows/tag_test_latest.yaml deleted file mode 100644 index 63eb825b4..000000000 --- a/.github/workflows/tag_test_latest.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: Tag Latest Test Image -'on': - pull_request: - branches: - - develop - types: - - closed -jobs: - docker_tag: - runs-on: ubuntu-latest - steps: - - name: Check out GitHub Repo - if: github.event_name == 'pull_request' && github.event.action == 'closed' && - github.event.pull_request.merged == true - with: - ref: "${{ github.event.pull_request.head.sha }}" - uses: actions/checkout@v2 - - name: Build and Push to Packages - if: github.event.pull_request.draft == false - env: - PR: "${{ github.event.pull_request.number }}" - SHA: "${{ github.event.pull_request.head.sha }}" - DOCKER_ACTOR: "jsfillman" - DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}" - run: "./.github/workflows/scripts/tag_test_latest.sh\n" From 15cb006000ad4bc4cc2c653d0ebed678f36c5d54 Mon Sep 17 00:00:00 2001 From: bio-boris Date: Fri, 17 Jun 2022 14:57:14 -0500 Subject: [PATCH 5/9] Create manual-build.yml --- .github/workflows/manual-build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/manual-build.yml diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml new file mode 100644 index 000000000..944f9035a --- /dev/null +++ b/.github/workflows/manual-build.yml @@ -0,0 +1,11 @@ +--- +name: Manual Build & Push +on: + workflow_dispatch: +jobs: + build-push: + uses: kbase/.github/.github/workflows/reusable_build-push.yml@main + with: + name: '${{ github.event.repository.name }}-develop' + tags: br-${{ github.ref_name }} + secrets: inherit From 9dadef4d16cfd28c7593b7358960f2c23efffb0d Mon Sep 17 00:00:00 2001 From: bio-boris Date: Fri, 17 Jun 2022 14:57:34 -0500 Subject: [PATCH 6/9] Create pr_build.yml --- .github/workflows/pr_build.yml | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/pr_build.yml diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml new file mode 100644 index 000000000..0fa1c4643 --- /dev/null +++ b/.github/workflows/pr_build.yml @@ -0,0 +1,43 @@ +--- +name: Pull Request Build, Tag, & Push +on: + pull_request: + branches: + - develop + - main + - master + types: + - opened + - reopened + - synchronize + - closed +jobs: + build-develop-open: + if: github.base_ref == 'develop' && github.event.pull_request.merged == false + uses: kbase/.github/.github/workflows/reusable_build.yml@main + secrets: inherit + build-develop-merge: + if: github.base_ref == 'develop' && github.event.pull_request.merged == true + uses: kbase/.github/.github/workflows/reusable_build-push.yml@main + with: + name: '${{ github.event.repository.name }}-develop' + tags: pr-${{ github.event.number }},latest + secrets: inherit + build-main-open: + if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == false + uses: kbase/.github/.github/workflows/reusable_build-push.yml@main + with: + name: '${{ github.event.repository.name }}' + tags: pr-${{ github.event.number }} + secrets: inherit + build-main-merge: + if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == true + uses: kbase/.github/.github/workflows/reusable_build-push.yml@main + with: + name: '${{ github.event.repository.name }}' + tags: pr-${{ github.event.number }},latest-rc + secrets: inherit + trivy-scans: + if: (github.base_ref == 'develop' || github.base_ref == 'main' || github.base_ref == 'master' ) && github.event.pull_request.merged == false + uses: kbase/.github/.github/workflows/reusable_trivy-scans.yml@main + secrets: inherit From 848ee9f5fecff7c1b144b07c171e62d9b44e25c0 Mon Sep 17 00:00:00 2001 From: bio-boris Date: Fri, 17 Jun 2022 14:59:16 -0500 Subject: [PATCH 7/9] Create release-main.yml --- .github/workflows/release-main.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/release-main.yml diff --git a/.github/workflows/release-main.yml b/.github/workflows/release-main.yml new file mode 100644 index 000000000..a25467818 --- /dev/null +++ b/.github/workflows/release-main.yml @@ -0,0 +1,25 @@ +--- +name: Release - Build & Push Image +on: + release: + branches: + - main + - master + types: [ published ] +jobs: + check-source-branch: + uses: kbase/.github/.github/workflows/reusable_validate-branch.yml@main + with: + build_branch: '${{ github.event.release.target_commitish }}' + validate-release-tag: + needs: check-source-branch + uses: kbase/.github/.github/workflows/reusable_validate-release-tag.yml@main + with: + release_tag: '${{ github.event.release.tag_name }}' + build-push: + needs: validate-release-tag + uses: kbase/.github/.github/workflows/reusable_build-push.yml@main + with: + name: '${{ github.event.repository.name }}' + tags: '${{ github.event.release.tag_name }},latest' + secrets: inherit From bb0a29937756ad321b0fe4bac564e50bdbf4214e Mon Sep 17 00:00:00 2001 From: Gavin Date: Sun, 19 Jun 2022 22:25:11 -0700 Subject: [PATCH 8/9] Update AWS S3 jars Really need to update to gradle... --- .classpath | 34 ++++++++++--------- build.xml | 34 ++++++++++--------- docsource/conf.py | 2 +- docsource/releasenotes.rst | 8 +++++ .../test/kbase/JSONRPCLayerTest.java | 2 +- .../test/kbase/SchemaUpdaterCLITest.java | 2 +- .../workspace/version/WorkspaceVersion.java | 2 +- 7 files changed, 48 insertions(+), 36 deletions(-) diff --git a/.classpath b/.classpath index 3bb7d1690..4ff4bd202 100644 --- a/.classpath +++ b/.classpath @@ -9,7 +9,6 @@ - @@ -82,21 +81,6 @@ - - - - - - - - - - - - - - - @@ -104,5 +88,23 @@ + + + + + + + + + + + + + + + + + + diff --git a/build.xml b/build.xml index 2615d42c2..f4039ed4d 100644 --- a/build.xml +++ b/build.xml @@ -63,7 +63,7 @@ - + @@ -74,22 +74,24 @@ - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + + + diff --git a/docsource/conf.py b/docsource/conf.py index 4ec0075a0..bd5ed0a73 100644 --- a/docsource/conf.py +++ b/docsource/conf.py @@ -52,7 +52,7 @@ # The short X.Y version. version = '0.14' # The full version, including alpha/beta/rc tags. -release = '0.14.0' +release = '0.14.1-dev1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docsource/releasenotes.rst b/docsource/releasenotes.rst index af1330163..954ab2ed4 100644 --- a/docsource/releasenotes.rst +++ b/docsource/releasenotes.rst @@ -3,6 +3,14 @@ Workspace service release notes =============================== +VERSION: 0.14.1 (Released TBD) +------------------------------ + +UPDATES: + +* Updated the S3 client; no user visible changes. + + VERSION: 0.14.0 (Released 6/10/2022) ------------------------------------ diff --git a/src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java b/src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java index f127eed3d..5e889de64 100644 --- a/src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java +++ b/src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java @@ -99,7 +99,7 @@ */ public class JSONRPCLayerTest extends JSONRPCLayerTester { - private static final String VER = "0.14.0"; + private static final String VER = "0.14.1-dev1"; @Test public void ver() throws Exception { diff --git a/src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java b/src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java index 03a1fb6a1..e89d71435 100644 --- a/src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java +++ b/src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java @@ -41,7 +41,7 @@ public class SchemaUpdaterCLITest { - private static final String VERSION = "0.14.0"; + private static final String VERSION = "0.14.1-dev1"; private static final List HELP = list( "Usage: update_workspace_database_schema [-chosV] ", diff --git a/src/us/kbase/workspace/version/WorkspaceVersion.java b/src/us/kbase/workspace/version/WorkspaceVersion.java index 5a3d7cbe3..b383e1dfb 100644 --- a/src/us/kbase/workspace/version/WorkspaceVersion.java +++ b/src/us/kbase/workspace/version/WorkspaceVersion.java @@ -6,6 +6,6 @@ public class WorkspaceVersion { private WorkspaceVersion() {}; /** The version. */ - public static final String VERSION = "0.14.0"; + public static final String VERSION = "0.14.1-dev1"; } From c7e7f9ac1b173652d249d939a7499643a2b2d576 Mon Sep 17 00:00:00 2001 From: Gavin Date: Tue, 21 Jun 2022 10:37:36 -0700 Subject: [PATCH 9/9] Bump version to 0.14.1 --- docsource/conf.py | 2 +- docsource/releasenotes.rst | 4 ++-- src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java | 2 +- src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java | 2 +- src/us/kbase/workspace/version/WorkspaceVersion.java | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docsource/conf.py b/docsource/conf.py index bd5ed0a73..598b4b240 100644 --- a/docsource/conf.py +++ b/docsource/conf.py @@ -52,7 +52,7 @@ # The short X.Y version. version = '0.14' # The full version, including alpha/beta/rc tags. -release = '0.14.1-dev1' +release = '0.14.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docsource/releasenotes.rst b/docsource/releasenotes.rst index 954ab2ed4..66ab521ab 100644 --- a/docsource/releasenotes.rst +++ b/docsource/releasenotes.rst @@ -3,8 +3,8 @@ Workspace service release notes =============================== -VERSION: 0.14.1 (Released TBD) ------------------------------- +VERSION: 0.14.1 (Released 6/21/2022) +------------------------------------ UPDATES: diff --git a/src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java b/src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java index 5e889de64..88fc542a1 100644 --- a/src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java +++ b/src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java @@ -99,7 +99,7 @@ */ public class JSONRPCLayerTest extends JSONRPCLayerTester { - private static final String VER = "0.14.1-dev1"; + private static final String VER = "0.14.1"; @Test public void ver() throws Exception { diff --git a/src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java b/src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java index e89d71435..f42e5e60a 100644 --- a/src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java +++ b/src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java @@ -41,7 +41,7 @@ public class SchemaUpdaterCLITest { - private static final String VERSION = "0.14.1-dev1"; + private static final String VERSION = "0.14.1"; private static final List HELP = list( "Usage: update_workspace_database_schema [-chosV] ", diff --git a/src/us/kbase/workspace/version/WorkspaceVersion.java b/src/us/kbase/workspace/version/WorkspaceVersion.java index b383e1dfb..7c2d6935f 100644 --- a/src/us/kbase/workspace/version/WorkspaceVersion.java +++ b/src/us/kbase/workspace/version/WorkspaceVersion.java @@ -6,6 +6,6 @@ public class WorkspaceVersion { private WorkspaceVersion() {}; /** The version. */ - public static final String VERSION = "0.14.1-dev1"; + public static final String VERSION = "0.14.1"; }