Skip to content

Commit

Permalink
Make obs project configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbkr committed Nov 6, 2023
1 parent c167e81 commit 09172bf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions config-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jwt-secret: "N#xTe4>IGSWfH#M&MYXxI~#w9yj@X8X/g8-N{;n)5D>kFh~AaW"

obs-user: some_user
obs-password: "some_pw"
obs-project: "home:some_user:rcb"

obs-check-duration: 30
obs-min-run-duration: 300 # 5 * 60
Expand Down
2 changes: 2 additions & 0 deletions lib/Config.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Config {

has $.obs-user;
has $.obs-password;
has $.obs-project;

has $.obs-check-duration;
has $.obs-min-run-duration;
Expand Down Expand Up @@ -102,6 +103,7 @@ class Config {

obs-user => %config<obs-user>,
obs-password => %config<obs-password>,
obs-project => %config<obs-project>,

obs-check-duration => %config<obs-check-duration>,
obs-min-run-duration => %config<obs-min-run-duration>,
Expand Down
2 changes: 1 addition & 1 deletion lib/OBSInterface.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ has Cro::HTTP::Client $!cro;
has LibXML $!xml-parser .= new;

has $.apiurl = 'https://api.opensuse.org';
has $.project = "home:patrickbkr:raku-ci";
has Str:D $.project is required;
has Str:D $.user is required;
has Str:D $.password is required;
has $!auth-str;
Expand Down
1 change: 1 addition & 0 deletions lib/RakudoCIBot.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ submethod TWEAK() {
$!obs-interface .= new:
user => config.obs-user,
password => config.obs-password,
project => config.obs-project,
;
$!obs .= new:
:$!source-archive-creator,
Expand Down

0 comments on commit 09172bf

Please sign in to comment.