Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/gradle/prime-router/com.hieryno…
Browse files Browse the repository at this point in the history
…mus-sshj-0.35.0
  • Loading branch information
snesm authored Jun 27, 2023
2 parents 2fa1411 + cbeb978 commit 9631461
Show file tree
Hide file tree
Showing 600 changed files with 59,940 additions and 17,744 deletions.
29 changes: 29 additions & 0 deletions .environment/chatops/help.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ACTION
Deploy (force push) to branch
USAGE
[<@bot>] gh-deploy [<branch>] to [<branch>] [OPTIONAL: for <owner/repo>]
EXAMPLES
@DevBot gh-deploy master to trialfrontend1
==========================================================================
ACTION
Lock branch to prevent deployments
USAGE
[<@bot>] gh-lock [add|remove|show] [<branch>]
EXAMPLES
@DevBot gh-lock add feature3
@DevBot gh-lock remove feature3
==========================================================================
ACTION
List deployment target branches
USAGE
[<@bot>] gh-targets
EXAMPLES
@DevBot gh-targets
==========================================================================
ACTION
Run workflow with manual trigger
USAGE
[<@bot>] gh-run [<workflow file>] [OPTIONAL: <owner/repo> <branch>] [OPTIONAL: --inputs <a:b,c:d>]
EXAMPLES
@DevBot gh-run destroy_demo_environment.yml --inputs env_name:demo1
@DevBot gh-run destroy_demo_environment.yml CDCgov/prime-reportstream master --inputs env_name:demo1
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/Content-Request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Content Request template
about: requests for ReportStream content changes
title: ''
labels: ''
assignees: ''

---

_[Governance document](https://docs.google.com/document/d/1__FE0OGlVAby0m7QyKfo_Qr0Gh_PvALaA1_DeCJSjzQ/edit#heading=h.qyvn837dl01t) for content process reference_

**Is this new content or an edit to current content?**

- [ ] **Edit**: It is not a change that affects the design or functionality of the page/feature.
- [ ] **New**: It is something new that is mostly content (not a tool).

**Questions for edit requests:**

1. Current page link:


2. Change requested:


3. Why is this change needed?


4. How urgent is this change and why?

**Questions for new content requests:**

1. Explanation:
2. Status of content:
- [ ] Idea
- [ ] Initial draft (rough ideas started)
- [ ] Final draft (fairly confident in the content you have for this)
3. What identified audience need does this content help meet? (See the [user task dashboard ](https://lookerstudio.google.com/u/0/reporting/921e245e-7d5c-4bec-b997-4e1d1f39cdd7/page/JYdKD)for verified needs)
4. What OKR (quarterly or annual) does this help meet? How?
5. Have you considered if existing content already meets these needs, or could with some modification?

**Complete your request by:**

- [ ] Making sure you’ve answered all questions for the appropriate request type (edit or new)
- [ ] Labeling this ticket as `content request`, `design` and `experience`
- [ ] Assigning this ticket to @audreykwr

_Thank you for contributing to content excellence for ReportStream!_
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/platform-user-story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Platform User Story
about: Platform team's User Story issue template
title: User Story Title
labels: pipeline, platform
assignees: ''

---

### User Story
<!--
What is a User Story?
A user story is a requirement for any functionality or feature, written down in one or two lines, about one and only one functionality or feature.
Use the following template when creating new User Stories/Tickets. Remove/replace any _italicized_ text:
"As a _[User Persona - who are we building this for?]_
I want to _[Intent - what is this user trying to achieve?]_,
so that _[Outcome - what is the value add to the user]_."
-->

### Description/Use Case
<!--
_Use this section to describe the 'Why', and/or provide an example scenario in which this feature/functionality would be valueable._
-->

### Risks/Impacts/Considerations
<!--
_Use this section to briefly list out any risks/impacts that may come about, as a result of the proposed solution._
- _System performance may be slowed_
- _Only a single search parameter can be used_
-->

### Dev Notes
<!--
_Use this section to describe any useful technical information to duplicate an issue or explain requirements related to this ticket without providing implementation details._
- _Provided is the data that was used to replicate the issue..._
- _To test, use SimpleReport upload CSV page to ..._
-->

### Acceptance Criteria
<!--
What is Acceptance Criteria?
A set of conditions or business rules, as defined by the Product Owner, which the functionality or feature should satisfy, in order to be accepted by the Product Owner.
Use the following template when creating new Acceptance Criteria:
"Given _[describe the precondition]_, when I _[describe the action performed]_, then I expect _[describe the expected outcome]_."
_OR... it may be written as a bulleted list._
- _Time must be displayed as HH:MM:SS_
- _Delivery rate must be shown as a percentage_
-->
29 changes: 29 additions & 0 deletions .github/actions/Start-AzFunction/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: AZFunction-start
description: start Azure function on Monday in Test environment
inputs:
resourceGroupName:
required: true
functionAppName:
required: true
functionName:
required: true
Subscription:
required: true
creds:
required: true

runs:
using: "composite"
steps:
- name: Start function app
id: StartAzFunction
shell: pwsh
run: |
$FnDetails = az functionapp show --name ${{ inputs.functionAppName }} --resource-group ${{ inputs.resourceGroupName }} --subscription ${{ inputs.Subscription }}
$Json = $FnDetails | ConvertFrom-JSON
$State = $Json.state
Write-Host $State
if ($State -contains "stop"){
az functionapp start --name ${{ inputs.functionAppName }} --resource-group ${{ inputs.resourceGroupName }} --subscription ${{ inputs.Subscription }}
}
30 changes: 30 additions & 0 deletions .github/actions/Start-PostgresDB/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PostgresServer-start
description: start postgres server on Monday in Test environment
inputs:
name:
required: true
subscription:
required: true
resource-group:
required: true


runs:
using: "composite"
steps:
# stop db server
- name: Start Postgres DB
id: start-db
shell: pwsh

run: |
$FnDetails = az postgres flexible-server show --name ${{ inputs.name }} --resource-group ${{ inputs.resource-group }} --subscription ${{ inputs.subscription }}
$Json = $FnDetails | ConvertFrom-JSON
$State = $Json.state
Write-Host $State
if ($State -notcontains "ready"){
az postgres flexible-server start --name ${{ inputs.name }} --resource-group ${{ inputs.resource-group }} --subscription ${{ inputs.subscription }}
}
29 changes: 29 additions & 0 deletions .github/actions/Stop-AzFunction/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: AZFunction-stop
description: stop Azure function on Friday in Test environment
inputs:
resourceGroupName:
required: true
functionAppName:
required: true
functionName:
required: true
Subscription:
required: true
creds:
required: true

runs:
using: "composite"
steps:
- name: Stop function app
id: StopAzFunction
shell: pwsh
run: |
$FnDetails = az functionapp show --name ${{ inputs.functionAppName }} --resource-group ${{ inputs.resourceGroupName }} --subscription ${{ inputs.Subscription }}
$Json = $FnDetails | ConvertFrom-JSON
$State = $Json.state
Write-Host $State
if ($State -contains "run"){
az functionapp stop --name ${{ inputs.functionAppName }} --resource-group ${{ inputs.resourceGroupName }} --subscription ${{ inputs.Subscription }}
}
32 changes: 32 additions & 0 deletions .github/actions/Stop-PostgresDB/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PostgresServer-stop
description: stop postgres server on evenings and weekends
inputs:
name:
required: true
subscription:
required: true
resource-group:
required: true
pass:
required: true
host:
required: true
creds:
required: true
runs:
using: "composite"
steps:
# stop db server
- name: Stop Postgres DB
id: stop-db
shell: pwsh
run: |
$FnDetails = az postgres flexible-server show --name ${{ inputs.name }} --resource-group ${{ inputs.resource-group }} --subscription ${{ inputs.subscription }}
$Json = $FnDetails | ConvertFrom-JSON
$State = $Json.state
Write-Host $State
if ($State -contains "ready"){
az postgres flexible-server stop --name ${{ inputs.name }} --resource-group ${{ inputs.resource-group }} --subscription ${{ inputs.subscription }}
}
2 changes: 1 addition & 1 deletion .github/actions/build-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runs:
run: tar -czvf prime-router-build.tar.gz build

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@39ee91a16bb587a6c2b4791d4954cf5299736efd
uses: EnricoMi/publish-unit-test-result-action@f0b5d2433f350eff587831d4ad22cb15aab75866
# Per https://github.com/EnricoMi/publish-unit-test-result-action#support-fork-repositories-and-dependabot-branches
if: >
always() &&
Expand Down
36 changes: 28 additions & 8 deletions .github/actions/build-frontend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ inputs:
runs:
using: "composite"
steps:

- name: Use Node.js with yarn
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version-file: 'frontend-react/package.json'
node-version-file: "frontend-react/package.json"

- run: yarn install
- run: yarn install --ignore-platform
working-directory: frontend-react
shell: bash

Expand All @@ -40,7 +39,7 @@ runs:
working-directory: frontend-react
run: |
echo "" >> .env.production
echo "REACT_APP_APPINSIGHTS_KEY=${{ inputs.appinsights-prod-key }}" >> .env.production
echo "VITE_APPINSIGHTS_KEY=${{ inputs.appinsights-prod-key }}" >> .env.production
yarn test:ci
yarn build:production
shell: bash
Expand All @@ -52,11 +51,30 @@ runs:
ENV=${{ inputs.env-name }}
if [[ $ENV != demo* && $ENV != "test" && $ENV != trialfrontend* ]]; then ENV="staging"; fi
echo "" >> .env.$ENV
echo "REACT_APP_APPINSIGHTS_KEY=${{ inputs.appinsights-staging-key }}" >> .env.$ENV
echo "VITE_APPINSIGHTS_KEY=${{ inputs.appinsights-staging-key }}" >> .env.$ENV
yarn lint
yarn test:ci
yarn build:$ENV
shell: bash

- name: Set up JDK 11 to generate backend coverage stats
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2
with:
java-version: '11'
distribution: 'adopt'
cache: 'gradle'

- uses: gradle/wrapper-validation-action@8d49e559aae34d3e0eb16cde532684bc9702762b

- name: Spin up build containers
working-directory: prime-router
run: docker-compose -f docker-compose.postgres.yml up -d
shell: bash

- name: Build Prime Router test report
working-directory: prime-router
run: ./gradlew jacocoTestReport -x fatjar
shell: bash

- name: SonarCloud Scan
if: inputs.GITHUB_TOKEN != '' && inputs.SONAR_TOKEN != ''
Expand All @@ -66,12 +84,14 @@ runs:
SONAR_TOKEN: ${{ inputs.SONAR_TOKEN }}
with:
args: >
-Dsonar.cpd.exclusions=frontend-react/**/*.test.*
-Dsonar.cpd.exclusions=frontend-react/**/*.test.*,prime-router/src/test/**,prime-router/src/testIntegration/**,prime-router/src/main/kotlin/cli/tests/**
-Dsonar.javascript.lcov.reportPaths=frontend-react/coverage/lcov.info
-Dsonar.coverage.exclusions=frontend-react/**/__mocks__/**,frontend-react/**/mocks/**,frontend-react/**/*.test.*
-Dsonar.sources=frontend-react/src
-Dsonar.coverage.exclusions=prime-router/src/test/**,prime-router/src/testIntegration/**,prime-router/src/main/kotlin/cli/tests/**,frontend-react/**/__mocks__/**,frontend-react/**/mocks/**,frontend-react/**/*.test.*
-Dsonar.sources=frontend-react/src,prime-router/src
-Dsonar.projectKey=CDCgov_prime-data-hub
-Dsonar.organization=cdcgov
-Dsonar.java.libraries=prime-router/build/libs/*.jar,prime-router/build/**/*.jar
-Dsonar.coverage.jacoco.xmlReportPaths=prime-router/build/reports/jacoco/test/jacocoTestReport.xml
- name: Tar frontend files
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/build-vars/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
using: "composite"
steps:

- name: Set Build Environment - DEMO1
- name: Set Build Environment - demo1
id: build_demo1
if: |
(github.event_name != 'pull_request' && github.ref_name == 'demo1') ||
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deploy-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ runs:
> /dev/null
shell: bash

- uses: Azure/functions-container-action@291eeb26a8f20958889600ba18e0d10657ce0818
- uses: Azure/functions-container-action@0aec6197033a72d3ca813f1aebd9391f639c2a8f
id: deploy-candidate
with:
app-name: ${{ env.FUNCTION_APP }}
Expand Down
Loading

0 comments on commit 9631461

Please sign in to comment.