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
pipeline { | |
agent { | |
label "master" | |
} | |
tools { | |
// Note: This should match with the tool name configured in your jenkins instance (JENKINS_URL/configureTools/) | |
maven "Maven 3.6.0" | |
} |
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
pipeline { | |
agent { | |
label "master" | |
} | |
environment { | |
// This can be nexus3 or nexus2 | |
NEXUS_VERSION = "nexus3" | |
// This can be http or https |
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
credentials: | |
system: | |
domainCredentials: | |
- credentials: | |
# Credential to use with Rest API operations and Nexus Jenkins plugin | |
- usernamePassword: | |
description: "Nexus credential" | |
id: "nexus-credentials" | |
password: "admin123" | |
scope: GLOBAL |
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
FROM jenkins/jenkins:2.204.1-jdk11 | |
# This will skip the wizard UI configuration so you can use Jenkins straight. | |
ENV JAVA_OPTS=-Djenkins.install.runSetupWizard=false | |
# This will install the plugins from "plugins.txt" | |
COPY plugins.txt /usr/share/jenkins/plugins.txt | |
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/plugins.txt | |
# This will copy the Configuration as Code file - init.groovy:/var/jenkins_home/init.groovy.d/init.groovy |
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
FROM jenkins/jenkins:2.204.1-jdk11 | |
# This will skip the wizard UI configuration so you can use Jenkins straight. | |
ENV JAVA_OPTS=-Djenkins.install.runSetupWizard=false | |
# This will install the plugins from "plugins.txt" | |
COPY plugins.txt /usr/share/jenkins/plugins.txt | |
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/plugins.txt | |
# This will copy the Configuration as Code file - init.groovy:/var/jenkins_home/init.groovy.d/init.groovy |
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
docker-compose up |
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
git clone https://github.com/danielalejandrohc/jenkins-examples.git | |
cd jenkins-examples/nexus |