Skip to content

Commit

Permalink
added Jenkinsfile and files for creating Jenkins container with seed job
Browse files Browse the repository at this point in the history
  • Loading branch information
egusator committed May 15, 2024
1 parent ba8f2d6 commit 233f313
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
pipeline {
agent any

environment {
JAVA_HOME = "/usr/lib/jvm/java-17-openjdk-amd64"
}

stages {

stage('Checkout') {
steps {
sh 'git submodule update --init --recursive'
}
}

stage('Build') {
steps {
sh 'mvn install'
dir('base/scripts') {
sh './lwr-ant-gen-all'
sh './lwr-build'
}
}
}

stage('Generate dist') {
steps {
sh './lwr-dist-linux /tmp/lwr'
}
}

stage('Generate deb') {
steps {

}
}
}
}
6 changes: 6 additions & 0 deletions jenkins-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM jenkins/jenkins:latest
ENV JAVA_OPTS -Djenkins.install.runSetupWizard=false
ENV CASC_JENKINS_CONFIG /var/jenkins_home/casc.yaml
COPY --chown=jenkins:jenkins plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN jenkins-plugin-cli -f /usr/share/jenkins/ref/plugins.txt
COPY casc.yaml /var/jenkins_home/casc.yaml
40 changes: 40 additions & 0 deletions jenkins-image/casc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
jenkins:
securityRealm:
local:
allowsSignup: false
users:
- id: "admin"
password: "admin"
- id: "dev"
password: "dev"
authorizationStrategy:
globalMatrix:
permissions:
- "Job/Build:dev"
- "Job/Cancel:dev"
- "Job/Read:dev"
- "Job/Workspace:dev"
- "Overall/Administer:admin"
- "Overall/Read:authenticated"
- "Run/Replay:dev"
- "Run/Update:dev"

unclassified:
jobs:
- script: >
folder('testjobs')
- script: >
pipelineJob('testjobs/default-agent') {
definition {
cpsScm {
scm {
git {
remote {
url('https://github.com/egusator/parent.git')
branch('*/master')
}
}
}
}
}
}
21 changes: 21 additions & 0 deletions jenkins-image/plugins.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ant: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
job-dsl: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

0 comments on commit 233f313

Please sign in to comment.