Progamatically start jenkins wiht dockerfile

This commit is contained in:
Begona Guereca
2022-08-03 22:26:34 +00:00
parent 2a3a675a3a
commit 070071a447
9 changed files with 111 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
FROM jenkins/jenkins:2.332.3-lts
ENV JAVA_OPTS -Djenkins.install.runSetupWizard=false
ENV CASC_JENKINS_CONFIG /var/jenkins_home/casc.yaml
# add plugins
COPY /plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
# add security perms
COPY casc.yaml /var/jenkins_home/casc.yaml
# seed with jobs
COPY jenkins_jobs /usr/share/jenkins/ref/jobs
+21
View File
@@ -0,0 +1,21 @@
jenkins:
securityRealm:
local:
allowsSignup: false
users:
- id: ${JENKINS_ADMIN_ID}
password: ${JENKINS_ADMIN_PASSWORD}
authorizationStrategy:
globalMatrix:
permissions:
- "Overall/Administer:admin"
- "Overall/Read:authenticated"
security:
queueItemAuthenticator:
authenticators:
- global:
strategy: triggeringUsersAuthorizationStrategy
unclassified:
location:
url: http://8080:8080/
@@ -0,0 +1,6 @@
lastCompletedBuild -1
lastFailedBuild -1
lastStableBuild -1
lastSuccessfulBuild -1
lastUnstableBuild -1
lastUnsuccessfulBuild -1
@@ -0,0 +1,21 @@
<?xml version='1.1' encoding='UTF-8'?>
<project>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.scm.NullSCM"/>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>echo &quot;hello from Jenkins Valet people!&quot;</command>
<configuredLocalRules/>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>
@@ -0,0 +1,6 @@
lastCompletedBuild -1
lastFailedBuild -1
lastStableBuild -1
lastSuccessfulBuild -1
lastUnstableBuild -1
lastUnsuccessfulBuild -1
@@ -0,0 +1,23 @@
<?xml version='1.1' encoding='UTF-8'?>
<flow-definition plugin="[email protected]">
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="[email protected]_ca_">
<script>pipeline {
agent any
stages {
stage(&apos;Hello&apos;) {
steps {
echo &apos;Hello World&apos;
}
}
}
}
</script>
<sandbox>true</sandbox>
</definition>
<triggers/>
<disabled>false</disabled>
</flow-definition>
+21
View File
@@ -0,0 +1,21 @@
ant:latest
authorize-project:latest
antisamy-markup-formatter:latest
build-timeout:latest
cloudbees-folder:latest
configuration-as-code:latest
credentials-binding:latest
email-ext:latest
git:latest
github-branch-source:latest
gradle:latest
ldap:latest
mailer:latest
matrix-auth:latest
pam-auth:latest
pipeline-github-lib:latest
pipeline-stage-view:latest
ssh-slaves:latest
timestamper:latest
workflow-aggregator:latest
ws-cleanup:latest