This is the primary repository for the BC Gov CSI Labs web presence.
In Development
Currently, CSI Labs is a statically generated site (generated using GatsbyJS) and served using Caddy Server and has no concept of users, authentication, or authorization. This will likely change in the future at which point this documentation will be updated to reflect details in those areas.
This project follows the GitHub Flow workflow for managing code branches and releases. Details and more specifics of how features are developed and rolled out are described below.
Do not attempt to merge a PR on your own, the jenkins process merges pull requests when promoted through the stages dev test prod.
As indicated above, the team follows the GitHub approach for managing code and releases. Accompanying this general approach the team has implemented some specific structures, tools and practices that are described in this section.
In the repo, at any given time, several to many branches may exist, and these can be categorized into a few "types" of branches, used for specific purposes. Each is outlined below.
master
branch: code that has been deployed an accepted in production ends up here. It is the source from which new feature branches are created.feature/<#>-<issue-or-user-story-description>
branch: branches named following a similar format to the one shown are "feature branches" and created for the purpose of capturing work related to a single feature, often corresponding to a single, specific user story or issue. This type of branch is created based on the lastest contents of master
.hotfix/<#>-<issue-description>
: a "hotfix" branch for a change required to remediate an urgent problem found in the production instance of the application. This type of branch would be based on the state of the master branch at the point the code in production was merged into it.Feature lifecycle is as follows:
mster
in GitHubfeature/<#>-<issue-or-user-story-description>
or similarmaster
. https://devhub-static-dev-<pull request number>-devhub-dev.pathfinder.gov.bc.ca/
. At the appropriate time, the pipeline and/or Git will also execute any configured automated checks or tests (code scans; unit, functional, or accessibility tests).cmd to update tree (from project root)
tree -I 'node_modules|coverage|.cache|app-web/public' -d -L 3
├── app-web │ ├── __fixtures__ │ ├── __mocks__ │ ├── __tests__ │ │ ├── components │ │ ├── pages │ ├── config │ │ └── jest │ ├── gatsby │ ├── public │ │ └── static │ ├── shell-scripts │ └── src │ ├── assets │ ├── components │ ├── constants │ ├── hoc │ ├── pages ├── docs ├── functional-tests │ ├── gradle │ │ └── wrapper │ └── src │ └── test ├── openshift └── pipeline ├── gradle │ └── wrapper └── src └── groovy
npm install
npm install -g gatsby-cli
npm run dev
npm run build
gatsby serve
npm run prettify
npm test
app-web
directorydocker build -t digital-gov-client .
docker run -v `pwd`/src:/usr/src/app/src -v `pwd`/plugins:/usr/src/app/plugins -v `pwd`/__tests__:/usr/src/app/__tests__ -v `pwd`/__fixtures__:/usr/src/app/__fixtures__ -v `pwd`/__mocks__:/usr/src/app/__mocks__ -v `pwd`/source-registry:/usr/src/app/source-registry -p 8000:8000 digital-gov-client
npm run develop
calls gatsby develop and sets the host with -H 0.0.0.0
. This is so docker can correctly
listen for requests on your local machines localhost.See (openshift/Readme.md)
To report bugs/issues/feature requests, please file an issue.
If you would like to contribute, please see our CONTRIBUTING guidelines.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Make Suggestions/Issues here! Issues are markdown supported.
Copyright 2019 Province of British Columbia
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
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.