Skip to content
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

feat(3161): Add support to allow remote triggers for a stage #572

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

sagar1312
Copy link
Member

Context

Currently a stage can have only the jobs within the same pipeline as its upstream. Because of this limitation, a stage cannot be triggered from a remote pipeline.

Objective

Allow stages to have jobs (Ex: sd@123:remote-job) from remote pipeline to be configured as its upstream.

References

screwdriver-cd/screwdriver#3161

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@sagar1312 sagar1312 force-pushed the sagar1312-feat-3161-remote_trigger_for_stage branch from a4de9e7 to 9972660 Compare August 2, 2024 16:32
config/migrationsConfig.js Outdated Show resolved Hide resolved
config/regex.js Outdated
// External trigger like sd@123:component (AND case)
EXTERNAL_TRIGGER_AND: /^sd@(\d+):([\w-]+)$/,
// External trigger like ~sd@123:component, ~sd@26:stage@alpha:setup (OR case)
EXTERNAL_TRIGGER: /^~sd@(\d+):(([\w-]+)|(stage@([\w-]+):setup))$/,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
EXTERNAL_TRIGGER: /^~sd@(\d+):(([\w-]+)|(stage@([\w-]+):setup))$/,
EXTERNAL_TRIGGER: /^~sd@(\d+):(?:([\w-]+)|(stage@([\w-]+):setup))$/,

Before:
Screenshot 2024-08-02 at 9 37 43 AM

After:
Screenshot 2024-08-02 at 9 37 29 AM

config/regex.js Outdated
// External trigger like ~sd@123:component, ~sd@26:stage@alpha:setup (OR case)
EXTERNAL_TRIGGER: /^~sd@(\d+):(([\w-]+)|(stage@([\w-]+):setup))$/,
// External trigger like sd@123:component, sd@26:stage@alpha:setup (AND case)
EXTERNAL_TRIGGER_AND: /^sd@(\d+):(([\w-]+)|(stage@([\w-]+):setup))$/,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
EXTERNAL_TRIGGER_AND: /^sd@(\d+):(([\w-]+)|(stage@([\w-]+):setup))$/,
EXTERNAL_TRIGGER_AND: /^sd@(\d+):(?:([\w-]+)|(stage@([\w-]+):setup))$/,

same idea as above

config/regex.js Outdated
// External trigger (OR and AND case)
// Can be ~sd@123:component or sd@123:component
EXTERNAL_TRIGGER_ALL: /^~?sd@(\d+):([\w-]+)$/,
EXTERNAL_TRIGGER_ALL: /^~?sd@(\d+):(([\w-]+)|(stage@([\w-]+):setup))$/,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
EXTERNAL_TRIGGER_ALL: /^~?sd@(\d+):(([\w-]+)|(stage@([\w-]+):setup))$/,
EXTERNAL_TRIGGER_ALL: /^~?sd@(\d+):(?:([\w-]+)|(stage@([\w-]+):setup))$/,

same idea as above

@sagar1312 sagar1312 force-pushed the sagar1312-feat-3161-remote_trigger_for_stage branch from 9972660 to ff0dbeb Compare August 2, 2024 16:42
@sagar1312 sagar1312 force-pushed the sagar1312-feat-3161-remote_trigger_for_stage branch from ff0dbeb to e7b7bd9 Compare August 2, 2024 16:44
@sagar1312 sagar1312 force-pushed the sagar1312-feat-3161-remote_trigger_for_stage branch from 0c57ad3 to a6fe71f Compare August 5, 2024 15:32
@tkyi tkyi merged commit 73a9ed7 into master Aug 5, 2024
2 checks passed
@tkyi tkyi deleted the sagar1312-feat-3161-remote_trigger_for_stage branch August 5, 2024 17:38
@sd-buildbot
Copy link

🎉 This PR is included in version 23.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants