This repository contains the code that run's the base SMK site that the BC Data Catalog will use for map previews.
As the header suggests start by cloneing this repo, then go into the repo directory, and make sure you are on the dev branch. (The default repo is configured to be dev so you should already be on it)
git clone https://github.com/bcgov/bcdc-smk
cd bcdc-smk
git checkout dev
Go to the file package.json
, find the line:
"dependencies": {
"smk": "1.0.0-beta.2",
...=
Update the text 1.0.0-beta.2
to whatever the latest version is
Delete the following files / directories if they exist in your repo directory, if you haven't already built then they won't exist.
- package-lock.json
- node_modules
Install dependencies:
npm install
Start the web server:
node node_modules/http-server/bin/http-server
Navigate the url that the previous command generates and verify that the map at that url displays.
This is automated through github actions. The image stream for bcdc-smk is: https://github.com/bcgov/bcdc-smk/packages/402546/versions
To trigger a build / dev deploy commit changes, push to github and create a pull request.
To deploy stage and commit the changes you have made and push them up
to origin
.
git add package.json
git commit -m "updating the SMK version used by BCDC-SMK site"
git push origin dev
The pipeline is configured to be triggered by a pull request. Create a new pull request from: dev to: master
Pipeline will:
- create an image tag
- create a new docker image
- tags the docker image
- deploys the image to a dev oc namespace
- updates the pr request with the url to the newly deployed version of the app
- sends reviewers a notification letting them know we are awaiting a review
pr. closed and merged to master
- deploys the image to prod
- tags the merged commit with the image tag
- deploys to prod
- deletes the dev env.