Hello! Welcome to July’s edition of the Kosli Changelog. Ewelina is currently enjoying her summer vacation, so I’m here to share a couple of changes from the last few weeks, before I take my summer break.
Jira Issue Commit Evidence
We know many teams that use Jira to track and manage their work, and have policies that require all code changes to reference the related Jira issue. This practice provides traceability from changes to requirements.Â
With the release of the Kosli CLI v2.6.0, you can now include evidence that your code changes reference a Jira issue with the new kosli report evidence commit jira
command.
With this command Kosli will expect your commit message or branch name to include a Jira issue key that conforms to the standard Jira Issue key format. Using the supplied credentials, Kosli will check that this Jira issue exists.
kosli report evidence commit jira \
--flows exampleFlow \
--commit abcd1234 \
--build-url https://www.github.com/org/repo/pull/1 \
--jira-api-token "yOUrAp1t0ken" \
--jira-base-url https://example-org.atlassian.net \
--jira-username you@example.com \
--name jira \
Evidence will be recorded that the Jira check was made. It will include the Jira issue keys found and whether they exist. The evidence will be marked as compliant only if Jira issues are referenced and they exist on the Jira instance.
Date/time syntax for finding and comparing Environment Snapshots
Using the kosli get snapshot
and the kosli diff snapshots
commands, the Kosli CLI has allowed you to use a few different expressions to specify individual snapshots:
aws-prod#526
refers to snapshot number 526 in the aws-prod environmentaws-prod
refers to the most recent snapshot (which is currently #797)aws-prod~2
refers to 2 snapshots behind the most recent snapshot (currently #795)
Now, we’ve added a new way for you to specify the snapshot you’re interested in based on the date & time of the snapshot. This is particularly useful when trying to pinpoint the changes in your environments that are potential causes of an incident.
The new snapshot expressions available are:
aws-prod@{2023-04-01T12:00:01}
refers to the snapshot that was the latest snapshot at one-second past midday (UTC) on the 1st of April 2023.aws-prod@{2023-01-01}
refers to the snapshot that was the latest snapshot on the 1st of January, 2023 – as no time is specified it will assume midnight UTC.aws-prod@{2.weeks.ago}
refers to the snapshot that was the latest snapshot, at this time, two-weeks ago. This syntax works using weeks, days, months, or years.
Here’s some examples of how you can use these commands using the Kosli cyber-dojo organization. You can play along too (no login or credit card is required).Â
Install the Kosli CLI. Then run these three commands to make sure everything works.
$ export KOSLI_ORG=cyber-dojo
$ export KOSLI_API_TOKEN=eyJ0eXAiOiJKV1QiLCJhbGc
$ kosli list snapshots aws-prod
You should see a list of the latest snapshots for the aws-prod environment for cyber-dojo.
Now let’s find out what that environment looked like on the 1st of April:
kosli get snapshot aws-prod@{2023-04-01T12:00:01}
How about what’s the difference between today’s environment and six-weeks ago?
$ kosli diff snapshots aws-prod aws-prod@{6.weeks.ago}
As always, we’d love to hear your thoughts and feedback in the Kosli Slack Community.