GithubHelp home page GithubHelp logo

jenkins-101's Introduction

Learning Jenkins, 03-01: Using a global build tool

Prerequisites

You will need to configure Maven as a global build tool.

In the Jenkins web interface, go to:

Manage Jenkins -> Tools -> Maven installations -> Add Maven.

Give your Maven installation a name and check the option to Install automatically.

Select the Save button.

Setting up the Jenkins Job

Create a freestyle job and configure it as follows:

  1. Under Source Code Management, select Git and enter the following URL:
https://github.com/LinkedInLearning/learning-jenkins-3003221
  1. MAKE SURE TO SET THE Branch Specifier to */03_01.
  2. Add a build step using Invoke Top-Level Maven Target.
  3. Select the Maven version you configured in the previous step.
  4. For the goal, enter package.

WINDOWS SYSTEMS

Select Add build step -> Execute Windows batch command.

Enter:

java -cp target/hello-1.0-SNAPSHOT.jar com.learningjenkins.App

Save the job and start the build.

Follow this link for more details on Windows

MacOS, Linux, and Docker

Select Add build step -> Execute shell.

Enter:

java -cp target/hello-1.0-SNAPSHOT.jar com.learningjenkins.App

Save the job and start the build.

Follow this link for more details on MacOS, Linux, and Docker

Troubleshooting Errors

ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

This error means you have probably entered the wrong branch under Source Code Management. You need to enter */03_01 for the branch.

jenkins-101's People

Contributors

devopsjourney1 avatar wiran-larbi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.