All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ps.jenkins.1.0.2.source-code.admin-user-cm.yml Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
metadata:
  name: admin-user
data:
  test.admin.password: ${TEST_ADMIN_PASSWORD}
  basic-security.groovy: |-
    #!groovy

    import jenkins.model.*
    import hudson.security.*

    def instance = Jenkins.getInstance()

    println "--> creating local user 'admin'"

    def hudsonRealm = new HudsonPrivateSecurityRealm(false)
    hudsonRealm.createAccount('admin',System.getenv("TEST_ADMIN_PASSWORD"))
    instance.setSecurityRealm(hudsonRealm)

    def strategy = new FullControlOnceLoggedInAuthorizationStrategy()
    instance.setAuthorizationStrategy(strategy)
    instance.save()




© 2015 - 2024 Weber Informatics LLC | Privacy Policy