Implement fully automated Jenkins HW8 setup with Ansible, JCasC and JJB
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
FROM jenkins/jenkins:2.541.3-lts-jdk21
|
||||
|
||||
USER root
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
docker.io \
|
||||
python3 \
|
||||
python3-pip \
|
||||
unzip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ARG ALLURE_VERSION=2.29.0
|
||||
RUN curl -fsSL -o /tmp/allure.zip \
|
||||
"https://github.com/allure-framework/allure2/releases/download/${ALLURE_VERSION}/allure-${ALLURE_VERSION}.zip" \
|
||||
&& unzip -q /tmp/allure.zip -d /opt \
|
||||
&& ln -s "/opt/allure-${ALLURE_VERSION}" /opt/allure \
|
||||
&& ln -s /opt/allure/bin/allure /usr/local/bin/allure \
|
||||
&& rm -f /tmp/allure.zip
|
||||
|
||||
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
|
||||
RUN jenkins-plugin-cli --plugin-file /usr/share/jenkins/ref/plugins.txt
|
||||
|
||||
USER jenkins
|
||||
@@ -0,0 +1,45 @@
|
||||
credentials:
|
||||
system:
|
||||
domainCredentials:
|
||||
- credentials:
|
||||
- usernamePassword:
|
||||
id: "jenkins-admin-userpass"
|
||||
scope: GLOBAL
|
||||
username: "${JENKINS_ADMIN_ID}"
|
||||
password: "${JENKINS_ADMIN_PASSWORD}"
|
||||
|
||||
jenkins:
|
||||
systemMessage: "Jenkins is configured by code (Docker + JCasC + JJB + Ansible)."
|
||||
numExecutors: 0
|
||||
mode: EXCLUSIVE
|
||||
securityRealm:
|
||||
local:
|
||||
allowsSignup: false
|
||||
users:
|
||||
- id: "${JENKINS_ADMIN_ID}"
|
||||
password: "${JENKINS_ADMIN_PASSWORD}"
|
||||
authorizationStrategy:
|
||||
loggedInUsersCanDoAnything:
|
||||
allowAnonymousRead: false
|
||||
crumbIssuer:
|
||||
standard:
|
||||
excludeClientIPFromCrumb: false
|
||||
globalNodeProperties:
|
||||
- envVars:
|
||||
env:
|
||||
- key: JENKINS_URL_INTERNAL
|
||||
value: "http://jenkins:8080"
|
||||
- key: OTUS_WORKSPACE_ROOT
|
||||
value: "/workspace/otus-autotests"
|
||||
- key: MOBILE_DB_PASSWORD
|
||||
value: "${MOBILE_DB_PASSWORD}"
|
||||
|
||||
unclassified:
|
||||
location:
|
||||
url: "${JENKINS_URL_PUBLIC}"
|
||||
|
||||
tool:
|
||||
allure:
|
||||
installations:
|
||||
- name: "allure"
|
||||
home: "/opt/allure"
|
||||
@@ -0,0 +1,13 @@
|
||||
workflow-aggregator
|
||||
git
|
||||
credentials
|
||||
credentials-binding
|
||||
matrix-project
|
||||
docker-workflow
|
||||
allure-jenkins-plugin
|
||||
configuration-as-code
|
||||
swarm
|
||||
ansicolor
|
||||
timestamper
|
||||
build-user-vars-plugin
|
||||
pipeline-utility-steps
|
||||
Reference in New Issue
Block a user