Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into fix-PUBLIC-1493
Browse files Browse the repository at this point in the history
  • Loading branch information
eapearson committed Sep 30, 2021
2 parents 68536e5 + 8769a64 commit d5febdd
Show file tree
Hide file tree
Showing 111 changed files with 35,568 additions and 21,883 deletions.
12 changes: 8 additions & 4 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ env:
es6: true
node: true
extends:
- 'eslint:recommended'
- "eslint:recommended"
- prettier
parserOptions:
ecmaVersion: 2018
ecmaVersion: 2018
root: true
rules:
strict:
Expand All @@ -16,8 +16,8 @@ rules:
no-console:
- error
- allow:
- warn
- error
- warn
- error
require-await:
- error
no-confusing-arrow:
Expand All @@ -40,3 +40,7 @@ rules:
- warn
prefer-spread:
- warn
indent:
- error
- 4
- SwitchCase: 1
3 changes: 2 additions & 1 deletion .github/workflows/build_prodrc_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Build Prod RC Image
pull_request:
branches:
- master
- main
types:
- opened
- synchronize
Expand All @@ -22,6 +23,6 @@ jobs:
env:
PR: "${{ github.event.pull_request.number }}"
SHA: "${{ github.event.pull_request.head.sha }}"
DOCKER_ACTOR: "jsfillman"
DOCKER_ACTOR: "${{ secrets.GHCR_USERNAME }}"
DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}"
run: "./.github/workflows/scripts/build_prodrc_pr.sh\n"
2 changes: 1 addition & 1 deletion .github/workflows/build_test_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
env:
PR: "${{ github.event.pull_request.number }}"
SHA: "${{ github.event.pull_request.head.sha }}"
DOCKER_ACTOR: "jsfillman"
DOCKER_ACTOR: "${{ secrets.GHCR_USERNAME }}"
DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}"
run: "./.github/workflows/scripts/build_test_pr.sh\n"
2 changes: 1 addition & 1 deletion .github/workflows/build_truss_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
env:
PR: "${{ github.event.pull_request.number }}"
SHA: "${{ github.event.pull_request.head.sha }}"
DOCKER_ACTOR: "jsfillman"
DOCKER_ACTOR: "${{ secrets.GHCR_USERNAME }}"
DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}"
run: "./.github/workflows/scripts/build_truss_pr.sh\n"
2 changes: 1 addition & 1 deletion .github/workflows/build_truss_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
env:
PR: "${{ github.event.pull_request.number }}"
SHA: "${{ github.event.pull_request.head.sha }}"
DOCKER_ACTOR: "jsfillman"
DOCKER_ACTOR: "${{ secrets.GHCR_USERNAME }}"
DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}"
run: "./.github/workflows/scripts/build_truss_push.sh\n"
5 changes: 3 additions & 2 deletions .github/workflows/scripts/build_prodrc_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ docker build --build-arg BUILD_DATE="$DATE" \
--build-arg BRANCH="$GITHUB_HEAD_REF" \
--build-arg PULL_REQUEST="$PR" \
--label us.kbase.vcs-pull-req="$PR" \
--label us.kbase.narrative-version="$NARRATIVE_VERSION_NUM" \
-t ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" .
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR"

Expand All @@ -25,8 +26,8 @@ docker build -t ghcr.io/"$MY_ORG"/"$MY_APP2":"pr-""$PR" \
--build-arg BRANCH="$GITHUB_HEAD_REF" \
--build-arg PULL_REQUEST="$PR" \
--label us.kbase.vcs-pull-req="$PR" \
--build-arg NARRATIVE_VERSION=$NARRATIVE_VERSION_NUM \
--build-arg NARRATIVE_GIT_HASH=$NARRATIVE_GIT_HASH \
--build-arg NARRATIVE_VERSION="$NARRATIVE_VERSION_NUM" \
--build-arg NARRATIVE_GIT_HASH="$NARRATIVE_GIT_HASH" \
-f Dockerfile2 \
.
docker push ghcr.io/"$MY_ORG"/"$MY_APP2":"pr-""$PR"
3 changes: 2 additions & 1 deletion .github/workflows/scripts/build_test_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ docker build --build-arg BUILD_DATE="$DATE" \
--build-arg BRANCH="$GITHUB_HEAD_REF" \
--build-arg PULL_REQUEST="$PR" \
--label us.kbase.vcs-pull-req="$PR" \
--label us.kbase.narrative-version="$NARRATIVE_VERSION_NUM" \
-t ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" .
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR"

Expand All @@ -25,7 +26,7 @@ docker build -t ghcr.io/"$MY_ORG"/"$MY_APP2":"pr-""$PR" \
--build-arg BRANCH="$GITHUB_HEAD_REF" \
--build-arg PULL_REQUEST="$PR" \
--label us.kbase.vcs-pull-req="$PR" \
--build-arg NARRATIVE_VERSION=$NARRATIVE_VERSION_NUM \
--build-arg NARRATIVE_VERSION="$NARRATIVE_VERSION_NUM" \
-f Dockerfile2 \
.
docker rmi kbase/narrative:tmp
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/scripts/tag_prod_latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ 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)
export MY_APP2="$MY_APP"_version
export NARRATIVE_VERSION_NUM=`grep '\"version\":' src/config.json.templ | awk '{print $2}' | sed 's/"//g'`

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 tag ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" ghcr.io/"$MY_ORG"/"$MY_APP":"$NARRATIVE_VERSION_NUM"
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"$NARRATIVE_VERSION_NUM"
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"latest"

docker pull ghcr.io/"$MY_ORG"/"$MY_APP2":"pr-""$PR"
docker tag ghcr.io/"$MY_ORG"/"$MY_APP2":"pr-""$PR" ghcr.io/"$MY_ORG"/"$MY_APP2":"latest"
docker tag ghcr.io/"$MY_ORG"/"$MY_APP2":"pr-""$PR" ghcr.io/"$MY_ORG"/"$MY_APP2":"$NARRATIVE_VERSION_NUM"
docker push ghcr.io/"$MY_ORG"/"$MY_APP2":"$NARRATIVE_VERSION_NUM"
docker push ghcr.io/"$MY_ORG"/"$MY_APP2":"latest"
5 changes: 5 additions & 0 deletions .github/workflows/scripts/tag_test_latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ 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)
export MY_APP2="$MY_APP"_version
export NARRATIVE_VERSION_NUM=`grep '\"version\":' src/config.json.templ | awk '{print $2}' | sed 's/"//g'`

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 tag ghcr.io/"$MY_ORG"/"$MY_APP":"pr-""$PR" ghcr.io/"$MY_ORG"/"$MY_APP":"$NARRATIVE_VERSION_NUM"
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"$NARRATIVE_VERSION_NUM"
docker push ghcr.io/"$MY_ORG"/"$MY_APP":"latest"

docker pull ghcr.io/"$MY_ORG"/"$MY_APP2":"pr-""$PR"
docker tag ghcr.io/"$MY_ORG"/"$MY_APP2":"pr-""$PR" ghcr.io/"$MY_ORG"/"$MY_APP2":"latest"
docker tag ghcr.io/"$MY_ORG"/"$MY_APP2":"pr-""$PR" ghcr.io/"$MY_ORG"/"$MY_APP2":"$NARRATIVE_VERSION_NUM"
docker push ghcr.io/"$MY_ORG"/"$MY_APP2":"$NARRATIVE_VERSION_NUM"
docker push ghcr.io/"$MY_ORG"/"$MY_APP2":"latest"
2 changes: 1 addition & 1 deletion .github/workflows/tag_environments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
uses: actions/checkout@v2
- name: Tag Deploy Environments
env:
DOCKER_ACTOR: jsfillman
DOCKER_ACTOR: ${{ secrets.GHCR_USERNAME }}
DOCKER_TOKEN: ${{ secrets.GHCR_TOKEN }}
IMAGE_TAG: ${{ github.event.client_payload.image_tag }}
SHA: ${{ github.event.pull_request.head.sha }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tag_prod_latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Tag Prod Latest
pull_request:
branches:
- master
- main
types:
- closed
jobs:
Expand All @@ -21,6 +22,6 @@ jobs:
env:
PR: "${{ github.event.pull_request.number }}"
SHA: "${{ github.event.pull_request.head.sha }}"
DOCKER_ACTOR: "jsfillman"
DOCKER_ACTOR: "${{ secrets.GHCR_USERNAME }}"
DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}"
run: "./.github/workflows/scripts/tag_prod_latest.sh\n"
2 changes: 1 addition & 1 deletion .github/workflows/tag_test_latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
env:
PR: "${{ github.event.pull_request.number }}"
SHA: "${{ github.event.pull_request.head.sha }}"
DOCKER_ACTOR: "jsfillman"
DOCKER_ACTOR: "${{ secrets.GHCR_USERNAME }}"
DOCKER_TOKEN: "${{ secrets.GHCR_TOKEN }}"
run: "./.github/workflows/scripts/tag_test_latest.sh\n"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ kbase-extension/log/
kbase-extension/kbase_templates/old/
kbase-extension/static/components/
kbase-extension/static/ext_components/
kbase-extension/static/ext_modules/
node_modules/
install.log
/src/build/
Expand All @@ -24,6 +25,7 @@ narrative_venv/
new_narrative_env_2/
js-coverage
cover
_attic

# From https://github.com/github/gitignore/blob/master/Python.gitignore

Expand Down Expand Up @@ -100,3 +102,6 @@ target/
.vscode
/tags
.idea

# For yarn users
yarn.lock
3 changes: 2 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run husky_msg && npm run prettier-pre-push && npm run eslint-pre-push
#npm run husky_msg && npm run prettier_check
npx lint-staged
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ js-coverage
python-coverage
kbase-extension/static/ext_components
kbase-extension/static/ext_packages
kbase-extension/static/ext_modules
kbase-extension/static/kbase/js/patched-components
venv
node_modules
cover
venv
Loading

0 comments on commit d5febdd

Please sign in to comment.