fix: latestplugin always true, add more complex bats tests, update devcontainers and make manifests (#857)

This commit is contained in:
Luigi Operoso
2023-06-27 09:37:31 +02:00
committed by GitHub
parent 0abc758dc3
commit 5ddcf1075d
13 changed files with 142 additions and 36 deletions
@@ -68,13 +68,11 @@ func buildConfigMapTypeMeta() metav1.TypeMeta {
}
func buildInitBashScript(jenkins *v1alpha2.Jenkins) (*string, error) {
defaultlatestPlugin := true
latestP := jenkins.Spec.Master.LatestPlugins
if !latestP {
latestP = defaultlatestPlugin
if latestP == nil {
latestP = new(bool)
*latestP = true
}
data := struct {
JenkinsHomePath string
InitConfigurationPath string
@@ -90,7 +88,7 @@ func buildInitBashScript(jenkins *v1alpha2.Jenkins) (*string, error) {
UserPlugins: jenkins.Spec.Master.Plugins,
InstallPluginsCommand: installPluginsCommand,
JenkinsScriptsVolumePath: JenkinsScriptsVolumePath,
LatestPlugins: latestP,
LatestPlugins: *latestP,
}
output, err := render.Render(initBashTemplate, data)
+1 -1
View File
@@ -8,7 +8,7 @@ const (
// SeedJobSuffix is a suffix added for all seed jobs
SeedJobSuffix = "job-dsl-seed"
// DefaultJenkinsMasterImage is the default Jenkins master docker image
DefaultJenkinsMasterImage = "jenkins/jenkins:2.319.3-lts"
DefaultJenkinsMasterImage = "jenkins/jenkins:2.401.1-lts"
// DefaultHTTPPortInt32 is the default Jenkins HTTP port
DefaultHTTPPortInt32 = int32(8080)
// DefaultSlavePortInt32 is the default Jenkins port for slaves