Skip to content

Commit

Permalink
[com.circleci.v2] Support CircleCI workflow job matrix (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyuu authored Dec 10, 2024
1 parent 29d5506 commit 63cbe07
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions packages/com.circleci.v2/Config.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,13 @@ class WorkflowJob {
/// For more information see the Using Workflows to Orchestrate Jobs page.
type: "approval"?

/// Run a parameterized job multiple times with different arguments.
///
/// For more information see the how-to guide on [Using Matrix Jobs](https://circleci.com/docs/using-matrix-jobs/).
///
/// In order to use the matrix stanza, you must use parameterized jobs.
matrix: JobMatrix?

/// Job Filters can have the key branches or tags
filters: JobFilters?

Expand Down Expand Up @@ -414,6 +421,19 @@ class FilterSpec {
ignore: (String|Listing<String>)?
}

class JobMatrix {
/// A map of parameter names to every value the job should be called with
parameters: Mapping<String, Listing<String|Number|Boolean>>

/// Argument maps that should be excluded from the matrix
exclude: Listing<Mapping<String, String>>?

/// An alias for the matrix, usable from another job’s requires stanza.
///
/// Defaults to the name of the job being executed
alias: String?
}

typealias Step = AbstractStep|SimpleStepName|OrbStep

typealias SimpleStepName = "checkout"|"setup_remote_docker"|"add_ssh_keyes"|String
Expand Down
2 changes: 1 addition & 1 deletion packages/com.circleci.v2/PklProject
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
amends "../basePklProject.pkl"

package {
version = "1.3.0"
version = "1.4.0"
}

0 comments on commit 63cbe07

Please sign in to comment.