-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from mrc-ide/mrc-6122
Update to new orderly.runner interface.
- Loading branch information
Showing
32 changed files
with
525 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package packit.config | ||
|
||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty | ||
import org.springframework.boot.context.properties.ConfigurationProperties | ||
|
||
data class RunnerRepository( | ||
val url: String, | ||
) | ||
|
||
@ConfigurationProperties(prefix = "orderly.runner") | ||
@ConditionalOnProperty(prefix = "orderly.runner", name = ["enabled"], havingValue = "true") | ||
data class RunnerConfig( | ||
val url: String, | ||
val locationUrl: String, | ||
val repository: RunnerRepository | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package packit.model.dto | ||
|
||
data class RepositoryFetch(val url: String) |
25 changes: 25 additions & 0 deletions
25
api/app/src/main/kotlin/packit/model/dto/RunnerSubmitRunInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package packit.model.dto | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty | ||
|
||
data class OrderlyLocation( | ||
val type: String, | ||
val args: Map<String, Any>, | ||
) { | ||
companion object { | ||
fun http(url: String): OrderlyLocation { | ||
return OrderlyLocation(type = "http", args = mapOf("url" to url)) | ||
} | ||
} | ||
} | ||
|
||
data class RunnerSubmitRunInfo( | ||
val url: String?, | ||
@JsonProperty("name") | ||
val packetGroupName: String, | ||
val branch: String, | ||
@JsonProperty("hash") | ||
val commitHash: String, | ||
val parameters: Map<String, Any>, | ||
val location: OrderlyLocation, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 41 additions & 15 deletions
56
api/app/src/main/kotlin/packit/service/OrderlyRunnerClient.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.