-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Divide JCasC file into multiple files.
- Loading branch information
Showing
10 changed files
with
132 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ LABEL maintainer="Dimitri Sifoua <[email protected]>" | |
LABEL repository="dksifoua" | ||
LABEL version="1.1.6" | ||
|
||
ARG JCASC_FILE | ||
ARG JCASC_FILES | ||
ARG PLUGINS_FILE | ||
ARG JENKINS_ADMIN_USER | ||
ARG JENKINS_ADMIN_NAME | ||
|
@@ -23,6 +23,8 @@ ENV JENKINS_ADMIN_EMAIL $JENKINS_ADMIN_EMAIL | |
ENV GITHUB_USER $GITHUB_USER | ||
ENV GITHUB_ACCESS_TOKEN $GITHUB_ACCESS_TOKEN | ||
|
||
ENV CASC_JENKINS_CONFIG=$JENKINS_HOME/casc_configs | ||
|
||
#USER root | ||
#RUN apt-get update && apt-get install -y lsb-release | ||
#RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \ | ||
|
@@ -34,7 +36,7 @@ ENV GITHUB_ACCESS_TOKEN $GITHUB_ACCESS_TOKEN | |
#RUN apt-get update && apt-get install -y docker-ce-cli | ||
|
||
USER jenkins | ||
COPY ${JCASC_FILE} $JENKINS_HOME/jenkins.yaml | ||
COPY ${JCASC_FILES} $CASC_JENKINS_CONFIG/ | ||
COPY ${PLUGINS_FILE} $REF/plugins.txt | ||
RUN echo 2.0 > $REF/jenkins.install.UpgradeWizard.state | ||
RUN jenkins-plugin-cli -f $REF/plugins.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
appearance: | ||
locale: | ||
systemLocale: en | ||
ignoreAcceptLanguage: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
jenkins: | ||
authorizationStrategy: | ||
globalMatrix: | ||
entries: | ||
- user: | ||
name: ${JENKINS_ADMIN_USER} | ||
permissions: | ||
- Overall/Administer | ||
- group: | ||
name: authenticated | ||
permissions: | ||
- Overall/Read | ||
- Job/Read | ||
- View/Read | ||
- Run/Replay | ||
- user: | ||
name: anonymous | ||
permissions: | ||
- Overall/Read | ||
- Job/Read | ||
- View/Read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
credentials: | ||
system: | ||
domainCredentials: | ||
- credentials: | ||
- string: | ||
description: GitHub Personal Access Token | ||
id: github-token | ||
scope: GLOBAL | ||
secret: ${GITHUB_ACCESS_TOKEN} | ||
- usernamePassword: | ||
description: GitHub Username & Password | ||
id: github-pass | ||
scope: GLOBAL | ||
username: ${GITHUB_USER} | ||
password: ${GITHUB_ACCESS_TOKEN} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
unclassified: | ||
githubpluginconfig: | ||
configs: | ||
- name: Default | ||
apiUrl: https://api.github.com | ||
credentialsId: github-token | ||
manageHooks: true | ||
|
||
githubconfiguration: | ||
apiRateLimitChecker: NoThrottle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
jobs: | ||
- script: > | ||
organizationFolder("GitHub Org - ${GITHUB_USER}") { | ||
description("This contains all repositories with a Jenkinsfile from my github account") | ||
displayName("GitHub Organization Folder - ${GITHUB_USER}") | ||
organizations { | ||
github { | ||
repoOwner("${GITHUB_USER}") | ||
apiUri("https://api.github.com") | ||
credentialsId("github-pass") | ||
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") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
jenkins: | ||
securityRealm: | ||
local: | ||
allowsSignup: false | ||
enableCaptcha: false | ||
users: | ||
- id: ${JENKINS_ADMIN_USER} | ||
name: ${JENKINS_ADMIN_NAME} | ||
description: ${JENKINS_ADMIN_DESC} | ||
password: ${JENKINS_ADMIN_PASS} | ||
properties: | ||
- timezone: | ||
timeZoneName: America/Toronto |