This repo provides a suite of utilities for use in the Mid ITF environment:
- dependency_checker, a utility to check Helm and Poetry dependencies
- cbf_config, a utility for configuring the CBF
- tmc_config, a utility for configuring the TMC with the correct Dishes in the SUT.
- git, tools for working with git. Currently contains a hook for adding Jira issue IDs to commit messages.
Clone this repo:
git clone https://gitlab.com/ska-telescope/ska-mid-itf-engineering-tools.git
cd ska-mid-itf-engineering-tools
git submodule update --init --recursive
Build the image
make oci-build
Install python requirements
poetry install
Run tests
poetry shell
make python-test
Lint code
make python-lint
The following steps happen in different locations.
- Complete the feature/story/bug related branch MR(s) and get it approved and merged.
- JIRA:
- create a release (REL) ticket in REL JIRA project
- set ticket status to
IN PROGRESS
- Local repo:
git checkout main && git pull
- show current version:
make show-version
- create release branch:
git checkout -b rel-1319-release-v0-5-2
- bump version:
make bump-<major|minor|patch>-release
- Manually edit whatever is not yet up-to-date
git push
(and convince Git to create the remote branch by running the suggested command)
- Gitlab:
- Create new MR and get it
- approved and
- merged
- Local repo:
git checkout main && git pull
- Tag step 1:
make git-create-tag
- Tag step 2:
make git-push-tag
- Gitlab:
- Check if your new tag pipeline successfully ran and automatically linked the new Release to the Jira ticket
- Jira:
- Mark the ticket as
READY FOR RELEASE
- Mark the ticket as
- Downstream repo / local test bed & Jira:
- install/use the new artifact and convince yourself that this release is fit for use
- If not fit for use:
- Set JIRA ticket status to
DO NOT USE
- Notify colleagues / collaborators
- Set JIRA ticket status to
- If fit for use:
- Set JIRA ticket status to
RELEASED
- Set JIRA ticket status to
NOTE: Step 8 should be carried out by the Product Owner, not Developers.
The dependency checker is a tool which looks at a project's dependencies and reports any stale dependencies to a Slack channel. It checks both Poetry dependencies and dependencies present in Helm charts.
First, include the dependency checker Gitlab template in your Gitlab CI:
include:
- project: "ska-telescope/ska-mid-itf-engineering-tools"
file: .gitlab/ci/check-dependencies/.pipeline.yaml
Then, set the environment variable DEPENDENCY_CHECKER_WEBHOOK_URL
to the webhook you want to send Slack messages to. This is typically set as a masked Gitlab variable. For Atlas, you can get the webhook secret from Vault under the Atlas namespace where it is called ATLAS_DEPENDENCY_CHECKER_WEBHOOK_URL
.
Lastly, create a scheduled pipeline for the execution of the Job. Navigate to Build -> Pipeline schedules and click on New Schedule. Configure when you want to run the dependency checker. See the screenshot for an example configuration which runs the Dependency Checker every Tuesday at 3:15 am.
The dependency checker Gitlab job, check-dependencies, is run as part of a scheduled pipeline on a weekly basis. It can also be executed manually from any pipeline. For this project, it reports stale dependencies to the #atlas-dependencies channel.
The Commit Message Preparer is used to prepend a Jira issue ID to your commit message, if there is one present. You can install it as follows:
# Installs it for this repo only
make install-prepare-commit-msg-local
# Installs it globally
make install-prepare-commit-msg-global
The global install will only affect working with SKA repositories. The tool uses a whitelist of origin prefixes to determine which repos it should be used in and it is configured to only work with SKA repos.
The tool only works on branches prefixed with the Jira issue ID.
The tool will not add the Jira issue ID if the commit message already starts with one.