-
Notifications
You must be signed in to change notification settings - Fork 1
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
Same project config for multiple items #24
Comments
Is the answer "downstream projects" ? |
if you please give more practical example, how this could be used ... ? |
If you have a github org with 100 projects that compiles with ./configure && make && make install I want one project to scan them all or one project to apply to a list of names (here repo names). |
probably not exactly what we're talking about but this where FTP protocol could be useful. You can spin up an supplemental application which accepts requests (say through a web hook) and dispatch all of them to the same Sparky build bypassing repo specific parameters. For example:
allow_manual_run: false # this project only built though an supplemental web app, using sparky FTP proto
sparrowdo:
docker: debian
no_sudo: true
say conf()<repo>;
say conf()<commit>;
# do something with repo and commit, you got the idea Application's cro http route: post -> 'queue', :%params {
my $sparky-dir = "{%*ENV<HOME>}./sparky/projects/make";
my $rnd = ('a' .. 'z').pick(20).join('');
my $id = "{$rnd}{$*PID}";
request-body -> (:$repo, :$commit ) {
# this directory is used as to keep build unique configuration
my $build-dir = "/some/local/dir/${$id}";
# write up build configuration
spurt "{$build-dir}/config.pl6", %(
repo => $repo,
commit => $commit
).perl;
# write up a trigger data with sparrowdo configuration and build CWD
spurt "{$sparky-dir}/.triggers/$id", %(
sparrowdo => %(
conf => "{$build-dir}/config.pl6",
),
description => "build for {$repo and $commit}",
).perl
);
}
} You could also see how this is implemented in RakuPlay - https://github.com/melezhik/RakuPlay/blob/main/lib/RakuPlay.rakumod#L40-L61. |
Of course this supplemental application should have a write access to Sparky file system, because it's File Triggering Protocol 😄 |
The idea is :
(*) An extra feature would be github/bitbucket/gitlab org/project/whatever scanning
The text was updated successfully, but these errors were encountered: