Skip to content

Commit

Permalink
Merge branch 'alpine' into 2.138.x-alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkernel committed Nov 2, 2018
2 parents 8580116 + 35df8e5 commit 71b6fa4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN /usr/local/bin/install-plugins.sh \
maven-plugin \
parameterized-trigger \
pipeline-maven \
script-security \
swarm \
workflow-aggregator

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Additional plugins include:
* maven-plugin
* parameterized-trigger
* pipeline-maven
* script-security
* swarm
* workflow-aggregator

Expand Down
4 changes: 2 additions & 2 deletions init.groovy.d/general_credentials.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Thread.start {
def ssh_key_domain = Domain.global()
def ssh_key_creds = new BasicSSHUserPrivateKey(ssh_key_scope,ssh_key_id,ssh_key_username,ssh_key_private_key_source,ssh_key_passphrase,ssh_key_description)

system_credentials_provider.addCredentials(ssh_key_domain,ssh_key_creds)
system_credentials_provider.getStore().addCredentials(ssh_key_domain,ssh_key_creds)
}

// Add credentials for deploying artifacts to Nexus
Expand All @@ -56,7 +56,7 @@ Thread.start {
def credentials_domain = Domain.global()
def user_pass_creds = new UsernamePasswordCredentialsImpl(credentials_scope,redentials_id,nexus_credentials_description,credentials_username,credentials_password)

system_credentials_provider.addCredentials(credentials_domain,user_pass_creds)
system_credentials_provider.getStore().addCredentials(credentials_domain,user_pass_creds)
}
// Save the state
instance.save()
Expand Down
30 changes: 30 additions & 0 deletions init.groovy.d/kubernetes.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import org.csanchez.jenkins.plugins.kubernetes.*
import jenkins.model.*

def instance = Jenkins.getInstance()

Thread.start {
sleep 10000

println("--> Configuring kubernetes plugin")

cloud_exist = false
if (instance.clouds) {
instance.clouds.each {
if (it.getDisplayName() == 'kubernetes') {
println("Found existing cloud: ${it.getDisplayName()}")
cloud_exist = true
}
}
}
if (!cloud_exist) {
kc = new KubernetesCloud('kubernetes')
kc.setSkipTlsVerify(true)
kc.setContainerCapStr('5')
jenkinsUrl = System.getenv("JENKINS_URL")
jenkinsUrl && kc.setJenkinsUrl(jenkinsUrl)
println "Adding k8s cloud: ${kc.getDisplayName()}"
instance.clouds.add(kc)
}
instance.save()
}

0 comments on commit 71b6fa4

Please sign in to comment.