Skip to content

Commit

Permalink
feat: Add GitHub Organization Folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
dksifoua committed Jul 9, 2024
1 parent e7fd9c2 commit 8bf2fd0
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ tasks:
--build-arg GITHUB_ACCESS_TOKEN="$GITHUB_ACCESS_TOKEN" \
--builder {{.BUILDER}} \
--file {{.DOCKER_FILE}} \
--no-cache \
--tag {{.REPOSITORY}}/jenkins:{{.VERSION}} \
.
silent: true
# --no-cache \

run:
desc: "Run local Jenkins container"
Expand Down
2 changes: 1 addition & 1 deletion modules/jenkins/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LABEL authors="Dimitri Sifoua"
LABEL description="Jenkins CI/CD Server"
LABEL maintainer="Dimitri Sifoua <[email protected]>"
LABEL repository="dksifoua"
LABEL version="1.1.3"
LABEL version="1.1.6"

ARG JCASC_FILE
ARG PLUGINS_FILE
Expand Down
79 changes: 76 additions & 3 deletions modules/jenkins/jcasc/jenkins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jenkins:
markupFormatter:
rawHtml:
disableSyntaxHighlighting: true
numExecutors: 0
numExecutors: 2

securityRealm:
local:
Expand Down Expand Up @@ -48,11 +48,84 @@ credentials:
- credentials:
- string:
description: GitHub Personal Access Token
id: github-dksifoua
id: github
scope: GLOBAL
secret: ${GITHUB_ACCESS_TOKEN}

appearance:
locale:
systemLocale: en
ignoreAcceptLanguage: true
ignoreAcceptLanguage: true

unclassified:
githubpluginconfig:
configs:
- name: Default
apiUrl: https://api.github.com
credentialsId: github
manageHooks: true

githubconfiguration:
apiRateLimitChecker: NoThrottle

jobs:
- script: >
organizationFolder('GitHub Org - dksifoua') {
description('This contains all repositories with a Jenkinsfile from my github account')
displayName('GitHub Organization Folder - dksifoua')
organizations {
github {
repoOwner('dksifoua')
apiUri('https://api.github.com')
credentialsId('github')
enableAvatar(true)
traits {
gitBranchDiscovery()
gitHubExcludeArchivedRepositories()
gitHubExcludeForkedRepositories()
gitHubIgnoreDraftPullRequestFilter()
gitHubTagDiscovery()
pruneStaleBranch()
pruneStaleTag()
wipeWorkspaceTrait()
gitHubBranchDiscovery {
strategyId(3) // All branches
}
gitHubPullRequestDiscovery {
strategyId(2) // The Current Pull Request Revision
}
multiBranchProjectDisplayNaming {
displayNamingStrategy('RAW_AND_OBJECT_DISPLAY_NAME')
}
/*userIdentity {
extension {
// If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds.
name(String value)
// If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds.
email(String value)
}
}*/
}
}
}
orphanedItemStrategy {
discardOldItems {
daysToKeep(7)
numToKeep(20)
}
}
projectFactories {
workflowMultiBranchProjectFactory {
scriptPath('Jenkinsfile')
}
}
triggers {
cron('@daily')
}
}
1 change: 1 addition & 0 deletions modules/jenkins/jcasc/plugins.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
blueocean:latest
configuration-as-code:latest
github-branch-source:latest
job-dsl:latest
locale:latest
matrix-auth:latest
token-macro:latest

0 comments on commit 8bf2fd0

Please sign in to comment.