We ❤️ Pull Requests for fixing or adding content. Thanks in advance for any contribution you may make.
For small changes, you can simply use the "Edit" button to update the Markdown file or any of the dialogs, and start the pull request process easily. You can use the preview tab in GitHub to make sure the updated content is properly formatted before committing. Once the pull request is placed, review the results of the pipeline and correct any mistake that is reported.
If you plan to contribute often or have a larger change or changes to make, it is best to setup your local environment for contribution.
The instructions for doing so are provided in the remainder of this page.
This guide provides steps to setup a dedicated environment for Online Product Engineering Dojo development. It includes Git and Katacoda related instructions.
Before you get started make sure to perform the one time setup:
Steps below illustrate how to work on a new Product Engineering Dojo feature.
See the Katacoda and branches
section for more details why the development is done directly on fork's main
branch.
-
Fetch latest changes from main repository:
git fetch upstream
-
Reset your fork's
main
branch to match exactly upstreammain
:git checkout main git reset --hard upstream/main git push --force
IMPORTANT: Only perform this step when you start working on new feature as the above commands will overwrite completely your
main
content. -
Hack, hack, hack, and commit your changes to Git:
# hack, hack, hack git add ... git commit ... git push
-
Your changes should be visible in Katacoda at https://katacoda.com/<your_katacoda_user>
-
To continue development of your feature:
# hack, hack, hack git add ... git commit ... git push
-
Open a new Pull Request to the main repository using your
main
branch
Katacoda only works with main
branch. Therefore you will use your fork's
main
branch to preview your work in Katacoda. To make the Pull Requests
and merges easier, at the beginning of each feature development we will reset
your main
to match exactly the main
of the main repository.
If you have reasons to not reset your fork's main
branch, you can use
feature branches, and then merge their content to your main
and create
Pull Requests out of the feature branch:
git fetch upstream
git checkout -b feature-X upstream/main
# hack, hack, hack
git add ...
git commit ...
git checkout main
git merge feature-X
git push
# changes now visible in Katacoda
git checkout feature-X
git push -u origin feature-X
# you can now open a Pull Request to the main repository using feature-X branch
# finally once all done - delete the branch
git branch -d feature-X
git push --delete feature-X
Online Product Engineering Dojo development is managed with one repository:
- https://github.com/dxc-technology/online-pe-dojo - contains Katacoda implementations of the scenarios.
To prepare your dedicated GitHub repository:
-
Fork in GitHub https://github.com/dxc-technology/online-pe-dojo
-
Clone your forked repository (e.g., https://github.com/user123/online-pe-dojo ) to your workstation.
-
Set your remotes as follows:
cd online-pe-dojo git remote add upstream git@github.com:dxc-technology/online-pe-dojo.git git remote set-url upstream --push DISABLED
Running
git remote -v
should give something similar to:origin git@github.com:user123/online-pe-dojo.git (fetch) origin git@github.com:user123/online-pe-dojo.git (push) upstream git@github.com:dxc-technology/online-pe-dojo.git (fetch) upstream DISABLED (push)
The use of
upstream --push DISABLED
is just a practice preventing those withwrite
access to the main repository from accidentally pushing changes there.
https://katacoda.com is lab environment used by Online Product Engineering Dojo that allows students to have dedicated environments for their class right in the browser.
-
Sign up for new account on https://katacoda.com
-
If that is your first visit, go to Claim Your Profile page and provide your username and name. Make sure to
SAVE
and then abort GitHub configuration as it does not allow to configure a non-public repository. -
Go to Your Profile page and then click on Settings icon in the middle of the page
-
Set Private Git Repository to
Yes
-
Set Git Scenario Repository to the address of your fork (e.g., https://github.com/user123/online-pe-dojo )
-
Make sure to click on
SAVE
button -
Do not close this window as we will need the values from Git Deploy Key and Git Webhook Secret
We now need to configure GitHub repository hook so that Katacoda is notified each time you push updates to your repository.
-
Open new browser window and go to your fork's URL (e.g., https://github.com/user123/online-pe-dojo )
-
Open the repository Settings page tab and then Deploy keys (left navigation)
-
Click on Add deploy key button and use the following information to set it up:
- Title:
katacoda.com
- Key: paste the Git Deploy Key value from your Katacoda settings page
- Allow write access: leave unchecked
- Title:
-
Click on Add deploy key button
-
Click on Webhooks (left navigation)
-
Click on Add webhook button and use the following information to set it up:
- Payload URL: https://editor.katacoda.com/scenarios/updated
- Content type:
application/json
- Secret: paste the Git Webhook Secret value from your Katacoda settings page
- Which events ...:
Just the push event
-
Click on Add webhook button to create it
If the setup is done correctly you should be able to access your Katacoda environment at:
https://katacoda.com/<your_katacoda_user>