-
Couldn't load subscription status.
- Fork 325
OPDATA-3845: Trigger 'deploy' workflow from release PR #4143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
8fd079a to
20fa414
Compare
de4e67c to
32d3d70
Compare
32d3d70 to
8b72e27
Compare
…in permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
d21d529 to
47659e1
Compare
OPDATA-3845
Description
When a PR is merged, workflows deploy.yml and upsert-release-pr.yml are run.
upsert-release-pr.ymlcreates/updates the PR to release all changed EAs.deploy.ymlpublishes docker images of changed EAs and creates/updates a PR ininfra-k8sto deploy those images.Both workflows independently run
yarn changeset versionto determine which EAs have changed and what their new versions will be.This PR removes running
yarn changeset versionfromdeploy.ymlby triggering based off of the PR created byupsert-release-pr.yml(detected byMASTERLIST.mdbeing in the PR). This way it doesn't need to runyarn changeset versionseparately to determine the changed EAs and their versions because that's already done to create the release PR.The point of this is to work towards being able to create release PRs, not only for all changed EAs but also for individual EAs or a subset of changed EAs. With the changes from this PR, such an individual/subset release PR would trigger publishing docker images and creating the infra-k8s PR exactly for those EAs planned for release, without having to duplicate logic to do so for the selected EAs.
In order not to interfere with the infra-k8s PRs currently created for the full releases, and in order to test this PR,
infra-k8sPRs created from this workflow will be created with a branch name with an extra suffix unless the trigger PR is on the branch used for full releases.One problem is that the is an environment restriction that prevents us from running the
deploy.ymlworkflow on unprotected branches. Because we don't actually need the code from the release PR (but only the list of adapters) we work around this by triggering the workflow on themainbranch from another workflow that determines which adapters to use.Changes
deploy.ymlworkflow toinfra-k8sPRdeploy_from_pr.ymlworkflow thatdeploy.ymlworkflow passing the determined list of adaptersupsert-release-pr.yml.github/scripts/changed-adapters.shto allow passing a predetermined list of adapters to be able to get the adapter data in the same format.Steps to Test
deploy_from_pr.ymlworkflow by adding anechoin front of the dispatch command.The result can be seen here: https://github.com/smartcontractkit/external-adapters-js/actions/runs/18781536416/job/53588747900
deploy.ymlis hard to test because it should only run from protected branches.Quality Assurance
infra-k8sconfiguration file.adapter-secretsconfiguration file or update the soak testing blacklist.test-payload.jsonfile with relevant requests.feature/x,chore/x,release/x,hotfix/x,fix/x) or is created from Jira.