Specify the subset when creating a build job

This commit is contained in:
Graham Christensen 2017-11-24 13:32:22 -05:00
parent 47f3bf00ff
commit b5f70a53c0
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C
2 changed files with 10 additions and 2 deletions

View file

@ -8,7 +8,14 @@ use amqp::protocol;
pub struct BuildJob { pub struct BuildJob {
pub repo: Repo, pub repo: Repo,
pub pr: Pr, pub pr: Pr,
pub attrs: Vec<String> pub subset: Option<Subset>,
pub attrs: Vec<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub enum Subset {
Nixpkgs,
NixOS,
} }
pub fn from(data: &Vec<u8>) -> Result<BuildJob, serde_json::error::Error> { pub fn from(data: &Vec<u8>) -> Result<BuildJob, serde_json::error::Error> {

View file

@ -99,7 +99,8 @@ impl worker::SimpleWorker for GitHubCommentWorker {
head_sha: pr.head.sha.clone(), head_sha: pr.head.sha.clone(),
target_branch: Some(pr.base.commit_ref.clone()) target_branch: Some(pr.base.commit_ref.clone())
}, },
attrs: attrs subset: Some(buildjob::Subset::Nixpkgs),
attrs: attrs,
}; };
let props = BasicProperties { let props = BasicProperties {