Developer Guidelines¶
Setting Up WSL (Windows users only)¶
WSL allows you to effortlessly incorporate a Linux environment into your Windows operating system. This method empowers developers to leverage the robust development tools of Linux while remaining within their Windows ecosystem. For the installation instructions of WSL, please refer to the following links:
Setting Up GitHub project repository¶
Connecting to GitHub with SSH¶
For an enhanced method of authentication when interacting with GitHub repositories, employing an SSH key is highly advisable, as opposed to the less secure username and password authentication. For detailed instructions, refer to the GitHub documentation:
Cloning Repository¶
To clone a repository using SSH and set up essential Git configurations, you can execute the following shell commands:
# Clone the repository via SSH
git clone git@github.com:bcgov/platform-services-registry.git
# Change into the cloned repository directory
cd platform-services-registry
GPG key signing¶
To ensure the legitimacy of Git commits, it is strongly recommended to sign them using a GPG key. For step-by-step guidance, please consult the GitHub documentation:
To enable GPG signing in Git, follow these steps in the repository:
# Define the signing key hash
git config user.signingkey "<hash>"
# Specify Git to sign commits and tags with GPG
git config commit.gpgsign true
git config tag.gpgsign true
# Set the GPG program for signing (if not already set)
git config gpg.program gpg
Setting up the local development environment¶
- Using Linux or MacOS terminals is advised for the development of web applications and managing their pipelines.
asdf
is a tool to manage the required packages with specific versions.- All the packages are defined in
tool-versions
.
Installation¶
- Install
asdf
according to theasdf
installation guide. - https://asdf-vm.com/guide/getting-started.html#getting-started
- Install
asdf
packages defined in.tool-versions
. - Confirm the packages installed.
- Install python packages.
- Install the pre-commit script.
Setting Up GitHub Workspace¶
Working on features¶
- Create a
feature
branch. - Make sure the branch is rebased onto
main
branch. - Make changes to complete the task.
- Make a commit with the changes.
- Push the commit to the remote repository.
- Make a PR from the feature branch into the target branch via UI.
- Wait until the checks pass before requesting the peer review via UI.
- Once the PR is approved, merge the PR via UI.