Skip to content

Add changelog check after a new release is created#321

Open
isabelrios wants to merge 7 commits intomainfrom
irios-new-jenkins-file-verify-release-tags
Open

Add changelog check after a new release is created#321
isabelrios wants to merge 7 commits intomainfrom
irios-new-jenkins-file-verify-release-tags

Conversation

@isabelrios
Copy link
Copy Markdown
Collaborator

@isabelrios isabelrios commented Apr 22, 2026

The end goal is to automatically create targeted TestRail test runs based on what code changed between two release versions, added to the same milestone created by the existing iOS release automation.

In order to do this iteratively, let's just add the new jenkins file that will check the change log between current and previous release, nothing else for now. It will send a notification like:

Head tag from latest_tags.json: firefox-v150.1
 Base tag (previous version):    firefox-v149.3

 Comparing firefox-v149.3 → firefox-v150.1
 Total changed files (raw): 42
 After filtering ignored paths: 31

 Changed files (31):
   firefox-ios/Client/Frontend/Browser/Tabs/TabTray.swift
   firefox-ios/Client/Frontend/Settings/SettingsTableViewController.swift
   ... and 11 more

 Unmatched files: 3 

environment {
PATH = "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin:${env.PATH}"
GITHUB_TOKEN = credentials('github-token')
SLACK_WEBHOOK = credentials('slack-mobile-alerts-tooling-webhook')
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may add the sandbox webhook instead to not make noise in channels

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use slack-mobile-alerts-sandbox-webhook credentials

}
steps {
script {
try {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this so that if the new job fails, the current job will not be affected. The failure will be shown as a warning.

@isabelrios isabelrios requested a review from mdotb-moz April 22, 2026 11:11
@@ -0,0 +1,36 @@
name: Changelog Analysis
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this github action to be able to manually debug and verify that we get the correct changelog

@isabelrios isabelrios marked this pull request as ready for review April 23, 2026 08:11
- uses: actions/checkout@v4

- name: Install dependencies
run: pip install requests pyyaml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stage('Install Dependencies') {
steps {
dir('testrail') {
sh '''
set -e
python3 -m venv .venv
.venv/bin/pip install --no-cache-dir -r requirements.txt
'''
}
}
} Can we use venv?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here in the github action or you mean in the jenkinsfile @mdotb-moz ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry in the jenkinsfile

on:
push:
branches:
- irios-new-jenkins-file-verify-release-tags
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this scoped just for testing on this branch currently?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is for testing purposes, we would not need the github action since the Jenkins file with the script will be triggered as part of the Create milestone job. Once there is a new version detected, we run the changelog to know what has been affected by the new release

Comment thread changelog-analysis/get_change_log.py Outdated


def get_changed_files(owner: str, repo: str, base: str, head: str) -> List[str]:
url = f"https://api.github.com/repos/{owner}/{repo}/compare/{base}...{head}"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should note here that this returns a maximum of 250 commits that will have to paginated.

When calling this endpoint without any paging parameter (per_page or page), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.

For large releases, files beyond that limit are silently dropped here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh that is a good catch thank you. I will add that

testrail_project_id, milestone_name, milestone_description
)

with open("milestone_id.txt", "w") as f:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is written to root but in the Jenkins file it's read from testrail, I would write to a similar testrail dir

passwordVariable: 'TESTRAIL_PASSWORD')]) {
sh '''
python3 run_release_selection.py \
--head_tag ${RELEASE_TAG} \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only see a base_tag as currently accepted in the script

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am missing some changes here.. --head_tag would be given by RELEASE_TAG which is shared from a previous script.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create-milestone triggers create-smart-test-runs and passes RELEASE_TAG as a parameter, so the Jenkinsfile always calls the script with --head_tag

@isabelrios isabelrios force-pushed the irios-new-jenkins-file-verify-release-tags branch from 0cfd35c to 3911547 Compare April 28, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants