Skip to content

Commit

Permalink
internal: Pass job ID during artifact completion. (#604)
Browse files Browse the repository at this point in the history
* Merge subscribers.

* Pass job id.

* Trigger CI.

* Add keywords.
  • Loading branch information
milesj committed Feb 13, 2023
1 parent 6ef8a4c commit 11818ce
Show file tree
Hide file tree
Showing 9 changed files with 525 additions and 560 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/moon.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Bump CI: 1

name: Moon
on:
push:
Expand Down
23 changes: 5 additions & 18 deletions crates/core/action-pipeline/src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use crate::errors::PipelineError;
use crate::processor::process_action;
use crate::run_report::RunReport;
use crate::subscribers::local_cache::LocalCacheSubscriber;
use crate::subscribers::moonbase_cache::MoonbaseCacheSubscriber;
use crate::subscribers::moonbase_ci::MoonbaseCiSubscriber;
use crate::subscribers::moonbase::MoonbaseSubscriber;
// use crate::worker_pool::WorkerPool;
use console::Term;
use moon_action::{Action, ActionStatus};
Expand Down Expand Up @@ -384,22 +383,10 @@ async fn create_emitter(workspace: Arc<RwLock<Workspace>>) -> Emitter {
}
}

if let Some(session) = &local_workspace.session {
if session.remote_caching_enabled {
emitter
.subscribers
.push(Arc::new(RwLock::new(MoonbaseCacheSubscriber::new())));
} else {
MoonbaseCacheSubscriber::not_enabled();
}

if session.ci_insights_enabled {
emitter
.subscribers
.push(Arc::new(RwLock::new(MoonbaseCiSubscriber::new())));
} else {
MoonbaseCiSubscriber::not_enabled();
}
if local_workspace.session.is_some() {
emitter
.subscribers
.push(Arc::new(RwLock::new(MoonbaseSubscriber::new())));
}
}

Expand Down
3 changes: 1 addition & 2 deletions crates/core/action-pipeline/src/subscribers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pub mod local_cache;
pub mod moonbase_cache;
pub mod moonbase_ci;
pub mod moonbase;
Loading

0 comments on commit 11818ce

Please sign in to comment.