Added VERIFY option for ide and office

-o verify can now be used with provs.
Also added an -o firefox option for convenience.
This commit is contained in:
erik 2022-09-05 17:49:06 +02:00
parent 9b66ea038d
commit 3323e50a43
3 changed files with 24 additions and 2 deletions

View file

@ -40,11 +40,14 @@ internal fun Prov.provisionDesktop(
validatePrecondition()
provisionBasicDesktop(gpg, ssh, gitUserName, gitEmail, submodules)
if (desktopType == DesktopType.OFFICE || desktopType == DesktopType.IDE) {
if (desktopType == DesktopType.OFFICE) {
provisionOfficeDesktop(submodules)
verifyOfficeSetup()
}
if (desktopType == DesktopType.IDE) {
provisionOfficeDesktop(submodules)
provisionIdeDesktop(submodules)
verifyIdeSetup()
}
ProvResult(true)
}
@ -72,6 +75,8 @@ fun Prov.provisionIdeDesktop(submodules: List<String>?) {
// IDEs
installVSC("python", "clojure")
installIntelliJ()
} else if (submodules.contains(DesktopSubmodule.VERIFY.name.lowercase())) {
verifyIdeSetup()
}
}
@ -99,6 +104,8 @@ fun Prov.provisionOfficeDesktop(submodules: List<String>?) {
}
aptInstall(SPELLCHECKING_DE)
} else if (submodules.contains(DesktopSubmodule.VERIFY.name.lowercase())) {
verifyOfficeSetup()
}
}
@ -136,5 +143,7 @@ fun Prov.provisionBasicDesktop(
configureNoSwappiness()
configureBash()
installVirtualBoxGuestAdditions()
} else if (submodules.contains(DesktopSubmodule.FIREFOX.name.lowercase())) {
installFirefox()
}
}

View file

@ -1,5 +1,5 @@
package org.domaindrivenarchitecture.provs.desktop.domain
enum class DesktopSubmodule {
TEAMS
TEAMS, FIREFOX, VERIFY
}

View file

@ -0,0 +1,13 @@
package org.domaindrivenarchitecture.provs.desktop.infrastructure
import org.domaindrivenarchitecture.provs.framework.core.Prov
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
import org.domaindrivenarchitecture.provs.syspec.domain.verifySpecFromResource
fun Prov.verifyIdeSetup(): ProvResult = task {
verifySpecFromResource("syspec-ide-config.yaml")
}
fun Prov.verifyOfficeSetup(): ProvResult = task {
verifySpecFromResource("syspec-office-config.yaml")
}