Docker
Set up your local project container.
Download the Container Configuration Files
In Azure DevOps, navigate to the project's Repos tab.
Find the file named ProjectName_Container.
Click on the ellipses in the file row and select Download as Zip.
Extract the files.
Edit the Container Configuration Files
Make the following edits.
- .env:
- GIT_USER_TOKEN=Your User Token (See Appendix A: Create a Personal Access Token in Azure DevOps)
- gw-secrets/GATEWAY_GIT_USER_SECRET:
- Your User Token (See Appendix A: Create a Personal Access Token in Azure DevOps)
- gw-init/git.yaml:
- repo_branch: Your dev branch
- ignition_projectName: Project Name
- user_name: Azure DevOps Username
- user_email: HBT Email
Deploy the Container
Launch a terminal from the folder containing the docker-compose.yml
Run the command: docker compose up -d
Modify the Container
Rename the Git Remote
Run the command: git remote --v
If your remote does not start with origin, run the command: git remote rename <Current-Remote-Name> origin
Run the command: git remote --v
to verify that the remote has been renamed.
Store Username in the Git Config
Run the command: git config user.name
If the terminal response does not match your username then run the command: git config --global user.name <Your Username>
Run the command: git config user.name
to verify the correct username is entered.
Store Email in the Git Config
Run the command: git config user.email
If the terminal response matches your email, then skip the remaining steps.
Run the command: git config --global user.email <Your Email>
Run the command: git config user.email to verify the correct username is entered.
Setup Git in VSCode
Select the Remote Explorer extension.
Hover over the newly created Dev Container and select Attach in New Window or Attach in Current Window.
The file location will default to /usr/local/bin/ignition, and you will need to add the repository folder to the workspace.
Deleting Tags & UDTs from Your Branch
From Docker Desktop, select the project gateway.
Under the Files tab, find the folder /usr/local/bin/ignition/data/projects/Project Name/tags.
Delete the multitagfiles folder and the tag browser JSON file.
In Designer, in the _Config folder of the tag browser, select the Export Tag Browser Tag File tag and then select the Export Multi File Tags tag.
Commit your changes.
The _Config tag folder contains the scripts required to update tags and should never be deleted. If it is deleted, you will have to import the main tag browser file from the container files manually.
The main tag browser folder can be deleted and imported back without issue.
Appendix A: Create a Personal Access Token in Azure DevOps
Navigate to the Azure DevOps home page.
Click on the user settings icon and select Personal Access Tokens.
Select the + New Token button.
Change the Scope to full access and give the token a recognizable name.
Setting the expiration to the maximum limit of one year is recommended.
Select the Create button.
Store this PAT in a secure location, as this is the last time that Azure DevOps will show it to you. Once you close the new token window, there is no way to see your token again, and a new one will have to be created if it’s lost.
Appendix B: Ignition Functions
Export Tag Browser Tag File
This button should be used if you would like to update the tag browser .json tag file. Ideally, this should be done weekly once all open PRs are approved, and you should let everyone know you are about to perform this action. This is to prevent merge conflicts if multiple people are working on updating tags in their PRs. This file also populates your tag browser when you run docker compose up -d.
Export Multi File Tags
This button should be used when you change tags in a tag browser folder. Once you have made the changes, this button updates the individual tag files you changed by making new version of the files in the tags/multifiletags/ folder.
Import Multi File Tags
This button should be used every time you load a project to ensure you are in sync.
Import Tag Browser Tag File
This button should be used when you wish to import the tag browser tag file version of tags into your tag browser.
Revision History
| Revision | Date | Name | Description |
|---|---|---|---|
| 1.0.0 | 5/6/2024 | Armaan Grewal | Initial Implementation |
| 1.0.1 | 5/9/2024 | Paul Burt | Added Modify the Container |
| 1.0.2 | 5/10/2024 | Paul Burt | Added Set up Git in VSCode |
| 1.0.3 | 6/4/2024 | Armaan Grewal | Added Deleting Tags & UDTs from your Branch |