Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge with Main branch #17

Merged
merged 20 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
963f7e9
fix: FORMS-1304 securely fetch local files (#1436)
WalterMoar Jul 17, 2024
9c00510
build(deps): bump braces and gulp in /components (#1423) (#1424)
vijaivir Jul 18, 2024
b3375aa
build(deps-dev): bump debug from 4.1.1 to 4.3.3 in /components (#1438…
vijaivir Jul 18, 2024
f1bb9e3
fix semver vulnerability (#1440)
vijaivir Jul 18, 2024
f0fa814
Moved API calls from formio to FormViewer (#1396)
jasonchung1871 Jul 24, 2024
cf3cde7
refactor: FORMS-1122 composition api submissions (#1441)
jasonchung1871 Jul 29, 2024
7f6d854
Update FormViewer.vue (#1446)
jasonchung1871 Jul 29, 2024
2bb374f
fix: FORMS-1336 use fileId for the file id (#1447)
WalterMoar Jul 29, 2024
ca09e6e
ci: FORMS-1228 update actions deps (#1449)
WalterMoar Jul 30, 2024
bdb7356
ci: FORMS-1228 update codeql version (#1450)
WalterMoar Jul 30, 2024
eb2ffc2
ci: FORMS-1405 update un/deploy actions (#1448)
WalterMoar Jul 30, 2024
8aa5d9a
ci: FORMS-1405 better deploy message (#1451)
WalterMoar Jul 30, 2024
43790e9
fix: FORMS-1387 update node version (#1445)
WalterMoar Jul 30, 2024
f6021dc
FORMS-1095 Move CHEFS links from Wiki to Backstage (#1430)
bhuvan-aot Jul 30, 2024
c8c1f4f
fix: FORMS-1406 update cronjob curl image (#1452)
WalterMoar Jul 30, 2024
2653749
fix: FORMS-1336 validate fileId parameters (#1453)
WalterMoar Jul 31, 2024
b58ee10
refactor: FORMS-1407 move orm code to service (#1454)
WalterMoar Aug 1, 2024
81363aa
refactor: FORMS-1408 remove unnecessary if (#1455)
WalterMoar Aug 1, 2024
9e08f10
refactor: FORMS-1237 alphabetize functions (#1456)
WalterMoar Aug 1, 2024
25f8638
Changes from main
abhilash-aot Aug 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VARIANT="18.20.3-bookworm"
ARG VARIANT="18.20.4-bookworm"
FROM node:${VARIANT}

# not much in here, could acheive this another way for sure...
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dockerfile": "Dockerfile",
"context": "..",
"args": {
"VARIANT": "18.20.3-bookworm"
"VARIANT": "18.20.4-bookworm"
}
},

Expand Down
8 changes: 4 additions & 4 deletions .github/actions/build-push-container/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,23 @@ runs:
echo "HAS_DOCKERHUB=${{ fromJson(inputs.dockerhub_username != '' && inputs.dockerhub_token != '') }}" >> $GITHUB_ENV

- name: Login to Github Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ env.GH_USERNAME }}
password: ${{ inputs.github_token }}

- name: Login to Dockerhub Container Registry
if: env.HAS_DOCKERHUB == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ inputs.dockerhub_username }}
password: ${{ inputs.dockerhub_token }}

- name: Prepare Container Metadata tags
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ env.GH_USERNAME }}/${{ inputs.image_name }}
Expand All @@ -151,7 +151,7 @@ runs:

- name: Build and Push to Container Registry
id: builder
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: ${{ inputs.context }}
push: true
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/deploy-to-environment/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ inputs:
ref:
description: The checkout ref id
required: false
default: ''
default: ""

runs:
using: composite
steps:
- name: Checkout repository from pull request
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
if: ${{ inputs.ref != '' }}
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ inputs.ref == '' }}

- name: Login to OpenShift Cluster
uses: jasonchung1871/oc-login@v1.1.2
uses: redhat-actions/oc-login@v1

with:
openshift_server_url: ${{ inputs.openshift_server }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -57,7 +57,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -71,4 +71,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
32 changes: 10 additions & 22 deletions .github/workflows/.deploy.yaml → .github/workflows/pr_deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy PR
name: PR Deploy
run-name: Deploy PR-${{ github.event.inputs.pr-number }}

env:
Expand All @@ -9,7 +9,7 @@ on:
inputs:
pr-number:
description: Pull request number
required: false
required: true
type: string

concurrency:
Expand Down Expand Up @@ -37,6 +37,7 @@ jobs:
echo "JOB_NAME=master" >> "$GITHUB_OUTPUT"
echo "ROUTE_PATH=/app" >> "$GITHUB_OUTPUT"
echo "URL=https://$ACRONYM-dev.apps.silver.devops.gov.bc.ca" >> "$GITHUB_OUTPUT"

- name: Final variables
id: vars
env:
Expand All @@ -45,17 +46,10 @@ jobs:
REF=refs/pull/$PR_NUMBER/head
echo REF:$REF
echo "ref=$REF" >> $GITHUB_OUTPUT
if [[ "$PR_NUMBER" != '' ]]; then
echo "APP_TITLE=${{ steps.default-vars.outputs.APP_TITLE }} - PR-$PR_NUMBER" >> "$GITHUB_OUTPUT"
echo "JOB_NAME=pr-$PR_NUMBER" >> "$GITHUB_OUTPUT"
echo "ROUTE_PATH=/pr-$PR_NUMBER" >> "$GITHUB_OUTPUT"
echo "URL=${{ steps.default-vars.outputs.URL }}/pr-$PR_NUMBER" >> "$GITHUB_OUTPUT"
else
echo "APP_TITLE=${{ steps.default-vars.outputs.APP_TITLE }}" >> "$GITHUB_OUTPUT"
echo "JOB_NAME=${{ steps.default-vars.outputs.JOB_NAME }}" >> "$GITHUB_OUTPUT"
echo "ROUTE_PATH=${{ steps.default-vars.outputs.ROUTE_PATH }}" >> "$GITHUB_OUTPUT"
echo "URL=${{ steps.default-vars.outputs.URL }}/app" >> "$GITHUB_OUTPUT"
fi
echo "APP_TITLE=${{ steps.default-vars.outputs.APP_TITLE }} - PR-$PR_NUMBER" >> "$GITHUB_OUTPUT"
echo "JOB_NAME=pr-$PR_NUMBER" >> "$GITHUB_OUTPUT"
echo "ROUTE_PATH=/pr-$PR_NUMBER" >> "$GITHUB_OUTPUT"
echo "URL=${{ steps.default-vars.outputs.URL }}/pr-$PR_NUMBER" >> "$GITHUB_OUTPUT"

build:
name: Build & Push
Expand All @@ -67,10 +61,6 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ needs.set-vars.outputs.ref }}
if: ${{ needs.set-vars.outputs.ref != '' }}
- name: Checkout repository
uses: actions/checkout@v4
if: ${{ needs.set-vars.outputs.ref == '' }}
- name: Build & Push
uses: ./.github/actions/build-push-container
with:
Expand All @@ -97,10 +87,6 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ needs.set-vars.outputs.ref }}
if: ${{ needs.set-vars.outputs.ref != '' }}
- name: Checkout repository
uses: actions/checkout@v4
if: ${{ needs.set-vars.outputs.ref == '' }}
- name: Deploy to environment
uses: ./.github/actions/deploy-to-environment
with:
Expand All @@ -118,9 +104,11 @@ jobs:
ref: ${{ needs.set-vars.outputs.ref }}
- name: Release Comment on PR
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ github.event.inputs.pr-number }} != '' && success()
if: success()
with:
header: release
hide_and_recreate: true
hide_classify: "OUTDATED"
message: |
Release ${{ github.sha }} deployed at <https://${{ env.ACRONYM }}-dev.apps.silver.devops.gov.bc.ca/pr-${{ github.event.inputs.pr-number }}>
number: ${{ github.event.inputs.pr-number }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Close pull request deployment
name: PR Undeploy
run-name: Undeploy PR-${{ github.event.inputs.pr-number }}

env:
ACRONYM: chefs
Expand All @@ -7,19 +8,9 @@ on:
workflow_dispatch:
inputs:
pr-number:
description: Pull request number, leave blank for dev/test/prod deployment
required: false
type: string
environment:
description: Environment name; choose dev for PR
description: Pull request number
required: true
type: choice
options:
- dev
- test
- prod
default: dev

type: string

jobs:
remove-pr-dev:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ jobs:
version: [18]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check CodeClimate Secrets
id: check-secrets
run: echo "HAS_CC_SECRETS=${{ secrets.CC_TEST_REPORTER_ID != '' }}" >> $GITHUB_OUTPUT
- name: Use Node.js ${{ matrix.version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-app
env:
cache-name: cache-node-modules
Expand All @@ -50,7 +50,7 @@ jobs:
CI: true
- name: Save Coverage Results
if: matrix.version == 18
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-app
path: ${{ github.workspace }}/app/coverage
Expand Down Expand Up @@ -81,13 +81,13 @@ jobs:
version: [18]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-frontend
env:
cache-name: cache-node-modules
Expand All @@ -107,7 +107,7 @@ jobs:
CI: true
- name: Save Coverage Results
if: matrix.version == 18
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-frontend
path: ${{ github.workspace }}/app/frontend/coverage
Expand All @@ -133,11 +133,11 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Restore Coverage Results
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- name: Publish code coverage
uses: paambaati/codeclimate-action@v3.2.0
uses: paambaati/codeclimate-action@v8
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
Expand Down
1 change: 0 additions & 1 deletion .tool-versions

This file was deleted.

3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The stability of the CHEFS application is of highest importance.
- Please bring your change ideas to the team before starting work
- Contributors must follow the [Code of Conduct](CODE-OF-CONDUCT.md)
- Changes must include test coverage, documentation, and comments
- If changes to the code alter the functionality of CHEFS, please update the [documentation](https://developer.gov.bc.ca/docs/default/component/chefs-techdocs) by raising a pull request in the CHEFS tech docs [repository](https://github.com/bcgov/common-hosted-form-service-techdocs).
- The repository guardians review all changes and may ask for revisions

## Contributing code
Expand All @@ -20,4 +21,4 @@ Government employees, public and members of the private sector are encouraged to

All contributors retain the original copyright to their stuff, but by contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users **under the terms of the [license](./LICENSE) under which this project is distributed**.

To set up CHEFS on your workstation, visit the [Developer](https://github.com/bcgov/common-hosted-form-service/wiki/Developer) Wiki page.
To set up CHEFS on your workstation, visit the [developer documentation](https://developer.gov.bc.ca/docs/default/component/chefs-techdocs/Developer/).
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/node:18.20.3-alpine3.20
FROM docker.io/node:18.20.4-alpine3.20

ENV NO_UPDATE_NOTIFIER=true
WORKDIR /opt/app-root/src/app
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Common Hosted Form Service [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![img](https://img.shields.io/badge/Lifecycle-Stable-97ca00)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md)

[Common Hosted Form Service](https://submit.digital.gov.bc.ca/app) is a web-based application designed for creating web forms and managing collected data. It is a free service available to all B.C. government employees and contractors with an IDIR account. For more information, visit the [CHEFS documentation](https://developer.gov.bc.ca/docs/default/component/chefs-techdocs).

[Watch a series of short videos](https://www.youtube.com/playlist?list=PL9CV_8JBQHirsQAShw45PZeU1CkU88Q53) to learn how to build your first form.


![Tests](https://github.com/bcgov/common-hosted-form-service/workflows/Tests/badge.svg)
[![Maintainability](https://api.codeclimate.com/v1/badges/950b1d6c61567a1da227/maintainability)](https://codeclimate.com/github/bcgov/common-hosted-form-service/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/950b1d6c61567a1da227/test_coverage)](https://codeclimate.com/github/bcgov/common-hosted-form-service/test_coverage)

Create, edit and publish forms.

## Directory Structure

.devcontainer - Visual Studio Code devcontainer and local environment config
Expand Down Expand Up @@ -42,12 +45,10 @@ Create, edit and publish forms.
- [CHEFS Load Test Readme](tests/load/load-test/README.md)
- [Devops Tools Setup](https://github.com/bcgov/nr-showcase-devops-tools)
- [Security Reporting](SECURITY.md)
- [Product Roadmap](https://github.com/bcgov/common-hosted-form-service/wiki/Product-Roadmap)
- [Product Roadmap](https://developer.gov.bc.ca/docs/default/component/chefs-techdocs/Product-Roadmap/)

## Help, Problems, and Feature Requests

Visit the [CHEFS Wiki](https://github.com/bcgov/common-hosted-form-service/wiki/) for help on using CHEFS.

To report a problem with CHEFS please create a [GitHub Issue](https://github.com/bcgov/common-hosted-form-service/issues).

Feature requests can be found in the [CHEFS Feedback](https://chefs-fider.apps.silver.devops.gov.bc.ca/) - vote for a feature you want in CHEFS, or add a new feature that hasn't been requested.
Expand All @@ -72,4 +73,4 @@ Please note that this project is released with a [Contributor Code of Conduct](C
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion app/frontend/src/components/bcgov/BCGovNavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const hasPrivileges = computed(() => {
<li v-if="hasPrivileges">
<a
data-cy="help"
href="https://github.com/bcgov/common-hosted-form-service/wiki"
href="https://developer.gov.bc.ca/docs/default/component/chefs-techdocs"
target="_blank"
:lang="locale"
>{{ $t('trans.bCGovNavBar.help') }}</a
Expand Down
Loading