Skip to content

Commit

Permalink
Push works
Browse files Browse the repository at this point in the history
  • Loading branch information
cheroliv committed Oct 13, 2024
1 parent 6213af0 commit f7baf79
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 56 deletions.
31 changes: 0 additions & 31 deletions buildSrc/src/main/kotlin/school/workspace/models.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,5 @@ package school.workspace
- Mettre à jour une valeur par chemin de clé
*/

//Deskboard-Bibliotheque-Tiroir-Thematique-Dossier
//Office-
typealias Office = MutableMap<String, MutableMap<String, MutableMap<String, MutableMap<String, MutableMap<String, MutableMap<String, MutableMap<String, Any>>>>?>?>>
typealias OfficeEntry = Pair<List<String>, Any>

//data class SchoolOffice(
// val bibliotheque: Bibliotheque? = null,
// val workspace: Workspace,
// val humanResources: HumanResources? = null
//) {
// data class Bibliotheque(
// val courses: MutableMap<String, Course>?,
// val catalogue: MutableMap<String, Training>?,
// val projectDocs: MutableMap<String, ProjectDocumentation>,
// ) {
// data class Course(val name: String)
// data class Training(val name: String)
// data class ProjectDocumentation(val name: String)
// }
//
// data class Workspace(val portfolio: MutableMap<String, Project>) {
// data class Project(
// val name: String,
// val cred: String,
// val builds: MutableMap<String, ProjectBuild>
// ) {
// data class ProjectBuild(val name: String)
// }
// }
//
// data class HumanResources(val cv: String)
//}

78 changes: 53 additions & 25 deletions buildSrc/src/test/kotlin/school/PluginTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.fasterxml.jackson.module.kotlin.readValue
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
import org.gradle.testfixtures.ProjectBuilder
import school.PluginTests.Forge.Workspace
import school.forms.FormPlugin
import school.frontend.SchoolPlugin
import school.frontend.SchoolPlugin.Companion.TASK_HELLO
Expand Down Expand Up @@ -36,28 +37,36 @@ val PrintStream.releaseOutput


class PluginTests {
val yamlConf = """
workspace:
portfolio:
projects:
school:
builds:
frontend:
path: "/home/cheroliv/workspace/atelier/school/frontend"
repository:
from: "dist"
to: "cvs"
url: "https://github.com/cheroliv/talaria.git"
credentials:
username: "cheroliv"
token: "token-value"
branch: "master"
message: "https://cheroliv.github.io/talaria"
""".trimIndent()

@Test
fun checkWorkspaceStruture() {
println("workspace trace")
//Deskboard-Bibliotheque-Tiroir-Thematique-Dossier
//data class SchoolOffice(
// val bibliotheque: Bibliotheque? = null,
// val workspace: Workspace,
// val humanResources: HumanResources? = null
//) {
// data class Bibliotheque(
// val courses: MutableMap<String, Course>?,
// val catalogue: MutableMap<String, Training>?,
// val projectDocs: MutableMap<String, ProjectDocumentation>,
// ) {
// data class Course(val name: String)
// data class Training(val name: String)
// data class ProjectDocumentation(val name: String)
// }
//
// data class Workspace(val portfolio: MutableMap<String, Project>) {
// data class Project(
// val name: String,
// val cred: String,
// val builds: MutableMap<String, ProjectBuild>
// ) {
// data class ProjectBuild(val name: String)
// }
// }
//
// data class HumanResources(val cv: String)
//}

data class Forge(val workspace: Workspace){
data class Workspace(
val bibliotheque: String,
val coreBusiness: String,
Expand All @@ -68,9 +77,10 @@ class PluginTests {
val collaboration: String,
val dashboard: String,
)
}

data class Forge(val workspace: Workspace)

@Test
fun checkWorkspaceStruture() {
val workspace = Workspace(
"bibliotheque",
"coreBusiness",
Expand All @@ -91,7 +101,7 @@ class PluginTests {
organisation: "organisation"
collaboration: "collaboration"
dashboard: "dashboard"
""".trimMargin()
""".trimIndent()
projectInstance.run {
yamlMapper.run {
readValue<Forge>(hardCodedYamlConf).run {
Expand Down Expand Up @@ -189,4 +199,22 @@ class PluginTests {
val projectInstance: Project
get() = ProjectBuilder.builder().build()
}
val yamlConf = """
workspace:
portfolio:
projects:
school:
builds:
frontend:
path: "/home/cheroliv/workspace/atelier/school/frontend"
repository:
from: "dist"
to: "cvs"
url: "https://github.com/cheroliv/talaria.git"
credentials:
username: "cheroliv"
token: "token-value"
branch: "master"
message: "https://cheroliv.github.io/talaria"
""".trimIndent()
}

0 comments on commit f7baf79

Please sign in to comment.