Skip to main content
Introduction to Devops

Jenkins and Artifact Management

Published: 2026-08-14
Level: postgraduate
Audience: Postgraduate students of software engineering and delivery

Prerequisite Knowledge

This lecture builds on the following concepts from earlier lectures. If any feel unfamiliar, review the linked notes before proceeding.

Previously Covered in This Subject

  • Continuous integration — 10.6 Continuous Integration (Lecture 10)
  • The CI/CD pipeline flow — 11.8 The CI/CD Pipeline: A Generic Four-Phase Flow (Lecture 11)
  • Jenkins job configuration and build triggers — 5.15 Jenkins: Job Configuration and Build Triggers (Lecture 5)
  • The build pipeline: build, test, lint — 5.14 The Build Pipeline: Build, Test, Lint (Lecture 5)
  • Selenium test automation — 10.3 Automating Functional Testing with Selenium (Lecture 10)
  • Artifacts and the artifact repository — 1.4.1 Building the Artifacts and 11.15 Forty Engineers, Syncing Binaries and Libraries (Lectures 1 and 11)
  • Version control with Git — 5.1.4 Configuration Management and Version Control (Lecture 5)

12.1 Assignment Bank and Submission

12.1.1 The Five-Problem Bank

Five assignment statements sit in a problem bank, and you choose your own track. Why would a course design its assignments this way instead of giving everyone the same task?

The bank exists so the assignment matches the person. The first three problems are lab based and technology oriented; the last two are case studies. The rules are simple: pick any one of problems 1, 2, or 3, or — if you choose the case study route — complete both problems 4 and 5, because they are a pair.

Every assignment is individual work. The problems were designed to stay in line with the course content and with experiential learning: rather than forcing everyone through the same task, each student can opt for the stream where they want to explore more. That is why the bank was discussed openly in class before being published — so doubts could be cleared here instead of through a flood of emails later. The documents and instructions go up on the portal the same day.

A useful way to read the choice is to map it to career direction. Problem 1 (Git and GitHub) and problem 3 (Jenkins CI/CD) are the backbone of the software-delivery track most DevOps engineers work in daily; problem 2 (Selenium) is for people heading toward the testing and quality-assurance side; problems 4 and 5 are for management and leadership roles that need to understand DevOps as a process rather than operate its tools. Whichever you choose, the assignment is the same kind of learning device: a small, well-scoped project you complete alone, end to end, with the course's toolchain.

12.1.2 Lab Track: Git and GitHub

The first lab assignment is purely about Git and GitHub, worked through Git Bash. The core motive is to become genuinely comfortable with Git commands — the assignment exists so you get hands-on practice issuing, combining, and debugging commands in a terminal.

Git is the version control system that nearly every codebase in industry runs on, and Git Bash is the terminal environment where Windows users run Git commands exactly as they would on Linux. The assignment trains the exact skill set a team member uses every day: staging changes, committing, branching, merging, pushing to a remote, and recovering when a command goes wrong. If someone prefers not to host on GitHub, Bitbucket is an acceptable alternative, but Git Bash practice itself is non-negotiable — the command-line habit, not the specific hosting site, is what the assignment is about.

The task list includes performing a set of operations on a repository and recording a demo of the work, which is explained in the submission section below.

12.1.3 Lab Track: Selenium

The second problem is for people in the testing domain who want to explore Selenium. You may navigate to any website of your choice — the instructor's own example was their institutional portal, and Amazon and Zomato were offered as other options — log into that portal, and interact with its elements. If the page has dropdowns or pop-up options, you identify those elements and drive the interaction through Selenium.

Selenium WebDriver is the industry-standard tool for browser automation: it opens a real browser, locates the elements on a page, and performs the same clicks, typing, and selections a human would. It is free to download, so there is no cost barrier. The shared sample script is written in Python because Python is easy to work with, but the language is your choice: candidates who are strong in Java can write the Selenium script in Java instead — Selenium's APIs exist in both languages.

A practical tip from the walkthrough: right-click a page and choose Inspect to understand and identify the web elements on that page before writing code. The Inspect panel shows the HTML structure behind the page — the tags, classes, and identifiers — and that is exactly what your Selenium locators must reference. At least one or two use cases should be shown, such as login and then a post-login feature on the same site, so the submission proves not just one action but a small flow of real user behavior.

12.1.4 Lab Track: Jenkins CI/CD

The third problem is on CI/CD with Jenkins. You are expected to integrate Jenkins with GitHub — not to implement GitHub Actions in depth, but to make push and pull actions trigger Jenkins automatically. Whenever you push changes to the GitHub repository, Jenkins should automatically trigger the pipeline, and the changes made to the source code should be deployed onto staging and production environments.

Cloud choice is yours: AWS or Azure, whichever you feel comfortable pushing artifacts to. But cloud is not mandatory — the motivation is Jenkins experience, not cloud billing. If you prefer, create virtual machines on your local system, call one staging and the other production, and push the artifacts to those VMs. The assignment explicitly asks for a Jenkinsfile pipeline that completes the build, test, and deploy stages. The test stage does not need to connect to any external tool like Selenium — a simple echo message that says this is the test phase is acceptable, as long as the stage exists. What is being graded is the pipeline shape and the Jenkins workflow, not the sophistication of the test code.

For delivery versus deployment, the distinction is concrete: delivery happens on the staging environment, and deployment happens on the production environment. On AWS you could push the artifact to an S3 bucket or an EC2 instance; on a local setup you push to the staging and production VMs. The two-environment pattern mirrors what real teams run: a staging area that proves the build, and a production area that serves the users.

12.1.5 Case Study Track: Assignments 4 and 5

Problems 4 and 5 are theoretical, case study based assignments, kept for people in the classroom who are not heading toward a technology career — management or upper-ladder professionals who are learning DevOps to understand the process, the people, and the practices. There is no technical implementation expected here.

Each case study asks you to draw a component-based diagram and explain how product development and delivery can be accelerated with the help of DevOps, covering the process and the best practices that should be followed. The diagram is the key artifact: it shows the components of a system — such as source control, the build server, the test environments, and the deployment targets — and the arrows show how work flows through them. Because both problems are purely theoretical, whoever opts for the case study route must complete both 4 and 5: they are one assignment split into two parts, not two separate choices.

Plagiarism warning: the case study submissions go through a plagiarism check. Do not copy content from internet sources — if more than 30% plagiarism is found, the submission scores lower. The check exists because a theoretical answer can be copied easily, unlike a performed lab demo; the expected work is your own diagram and your own explanation, not a pasted article.

When a student asked whether sample answers would be shared for the case study (since for labs it makes sense to work through everything yourself), the instructor agreed to provide highlights so there is a starting point:

Q: For the case study, will you share the answers or some highlights? For the labs it makes sense to figure everything out yourself.

A: Yes, absolutely. I will provide the highlights for the case study, so you will have something to work from. No issues at all.

The highlights give a direction without removing the individual work: a starting point, not a finished answer. To make the requirement clearer on the portal, the instructor plans to keep assignment 4 as a single posting split into Case Study A and Case Study B; you are supposed to execute both A and B.

12.1.6 Submitting Your Work

Lab based exercises are evaluated through a demo: the instructor wants to see how you performed, not just what you wrote. If you are comfortable recording the screen, record the whole session and upload the video to a Google Drive link that will be shared on Teams as well as on the portal. Audio is optional — if you want to explain or discuss what you did, record it with audio. If you prefer not to record, screenshots work: capture each step — what you did, the next action, the next task — and build them into a document. Screenshots can be converted into a PDF and uploaded to the portal.

Worked example — the submission walkthrough: the portal demands a submission for grading, so the video alone is not the whole process.

  1. Record your lab session as a screen video and upload it to the shared Google Drive folder.
  2. Name the drive folder sensibly: use your Bits ID and the problem number you solved, for example 2023A7PS1234_Problem2. Evaluators immediately know which assignment they are assessing.
  3. Create a short document containing your name, the assignment problem number you solved, and the drive location (the link to your folder).
  4. Submit that document on the portal.

Without the portal submission, grading cannot be completed — the portal record is what the evaluators grade from, and the drive link is how they reach your work. Final checklist: video in the right folder, folder named with Bits ID + problem number, document with name + problem number + drive link, document uploaded to the portal.

There is a second question about the demo itself — how much explanation the video needs:

Q: Do I need to explain my work in the screen video, or is showing it enough?

A: A screen video is fine by itself. If you want to explain something, that is your choice — you can always do so, and you can share the audio along with it.

The submission window is roughly four weeks: the deadline is the 6th of November, and the instructor considers that a comfortable amount of time. For lab assignments plagiarism is not a concern, because the work is purely performed by you — a performed demo cannot be copied the way a written answer can.

12.1.7 Schedule and Logistics

A few schedule notes were shared. There is no class next Sunday, because makeup examinations are scheduled for that day. The next contact session — the tenth — is on the 16th, and the tutorial session on the 18th is purely on Jenkins, covering the CI/CD pipeline hands-on. That tutorial is the direct preparation lane for assignment 3, so attending it with the assignment in mind pays off.

All assignment documents and instructions, including the Google Drive link, are published on the portal the same day, and questions can be directed to the WhatsApp platform afterwards to keep the instructor's inbox manageable.

Recap: Five problems, one choice — any single lab (Git and GitHub, Selenium, or Jenkins CI/CD) or both case studies (4 and 5 as a pair). Labs are graded through a demo (screen video or screenshot document), the portal submission with your Bits ID and problem number is mandatory, case studies carry a 30% plagiarism check, and the deadline is the 6th of November.

Bridge: The Jenkins assignment in this bank is only usable if you understand what Jenkins actually is. The next section explains where Jenkins came from and why this course chose it as the CI/CD tool.

12.2 Jenkins: History and Open-Source Roots

12.2.1 From Hudson to Jenkins

Why does the most widely used continuous integration server carry a name that sounds like a butler's title? The answer lies in a split that happened inside one project's history.

Jenkins began in 2004 under a different name: Hudson. The project was kickstarted by Kohsuke Kawaguchi while he was part of the Sun organization, and it was released as open source. When Sun merged with Oracle, Oracle decided that Hudson should become a proprietary, enterprise solution rather than an open source one. Kawaguchi wanted to keep it open source, so he continued the work under a new direction and introduced Jenkins, joined by a large community of contributors who helped implement and grow it.

The fork is a textbook case of what happens when a tool's license changes under its community's feet. The community did not want to follow the code into a closed, paid product, so it followed the developer and the open source spirit instead. The project kept its history, its plugins, and its users — only the name changed. The community kept it completely open source — there is not a single restriction on working with Jenkins.

The plugin ecosystem is the visible proof of that community's size: Jenkins offers more than 1400 plugins, and the count has come close to 1500. Those plugins are small extensions — for Git, Maven, SonarQube, Docker, Slack notifications, and hundreds of other tools — that anyone can install to add a capability to the server. That volume of community-built extensions is exactly what makes Jenkins flexible, and it is also why configuration matters so much, as the next section explains: with so many parts to choose from, someone has to decide how they fit together.

12.2.2 Encapsulated Tools versus a Configurable System

Other continuous integration systems — TeamCity was named as an example — are what the instructor calls encapsulated solutions. Everything is readily available; you click on a function or install a plugin and the tool just works, which makes them easy to use. The tool hides its inner workings behind a finished, polished surface.

Jenkins is different: configuration has to be done thoroughly by the person using it. Nothing is hidden for you — every integration is something you wire together yourself, which means you have to understand what each piece does.

The SonarQube example makes this concrete. To connect Jenkins to SonarQube, installing the SonarQube plugin is not enough. You must go into the configuration settings of Jenkins, create a session key from your SonarQube instance, and interconnect the two. The plugin only adds the capability; the session key is the credential that lets the two servers trust each other, and the configuration settings tell Jenkins where the SonarQube server lives and how to reach it. Every integration you perform with Jenkins — Git, Maven, SonarQube, anything — requires you to understand the configuration part and how the communication between the tools is happening.

Pitfall: expecting a Jenkins plugin to work the moment it is installed. A plugin is only a bridge between Jenkins and a tool; the bridge still needs the address, the credentials, and the settings on both sides — for SonarQube, that means the session key created in the SonarQube instance and entered in Jenkins configuration. The classic failure is installing the plugin and stopping there.

The instructor explicitly reframes this as an advantage rather than a drawback: the configuration work is a learning opportunity, because you understand the tool instead of just clicking it. But it is honest about the trade-off — there are people who do not want to invest time in that learning and just want CI/CD working, and for them the encapsulated tools in the market are the better fit.

Dimension Encapsulated tools (e.g., TeamCity) Jenkins
Setup effort Low — features work out of the box High — every integration is configured by you
Understanding gained Little about the internals Deep — you know how the tools talk to each other
Flexibility Bounded by what the product offers Huge — the plugin ecosystem (1400+) extends it
Best fit Teams that want CI/CD running fast with minimal investment Learners and teams that want control and customization

The decision rule from class: if your goal is a working CI/CD pipeline with the least possible learning cost, pick the encapsulated tool; if your goal is to understand continuous integration and control how the pieces connect, pick Jenkins.

Real-world: this configuration depth is exactly why Jenkins job descriptions keep asking for pipeline-as-code and plugin administration skills — knowing how to wire Jenkins to SonarQube, Maven, or a cloud provider is a day-to-day industry task, not a classroom exercise. In companies running Jenkins at scale, the person who can connect and maintain these integrations is the person who keeps the whole delivery chain working.

12.2.3 Why Open Source Makes Jenkins the Learning Choice

There is also a syllabus-driven reason Jenkins is the tool of choice for this course: it is purely open source, so any candidate can perform any action on a local system without licensing constraints.

You can install it, break it, reconfigure it, and start over freely. That freedom is what makes hands-on learning practical — the entire CI/CD practice can be exercised on one laptop, which fits the course's DevOps goals. Compare that with a commercial tool: the license, the activation, and the cost all get in the way of the experiment where you deliberately break a configuration to see what happens. Open source removes that barrier, and the freedom to break things without consequences is exactly the environment in which people learn fastest.

Recap: Jenkins began as Hudson in 2004 (Kawaguchi, Sun), split when Oracle wanted a proprietary product, and survived as a fully open source project with a big community and more than 1400 plugins. It sits opposite encapsulated tools like TeamCity: more configuration work, more understanding, and total freedom to learn on any laptop.

Bridge: Knowing what Jenkins is, the natural next step is running one. The next section walks through the environment you need and the first login.

12.3 Setting Up a Jenkins Environment

12.3.1 What You Need Before Installing

Jenkins is a continuous integration system, so the prerequisites for CI come bundled into its setup story. Three pieces must be in place before a first build can ever run.

Purpose: the setup story exists to give Jenkins three things — something to watch, a runtime to run on, and the server itself.

  1. A version control system — because the whole point is that a code change triggers the Jenkins pipeline. Jenkins has nothing to react to without a repository holding the code.
  2. Java on the JVM platform — Jenkins is a Java application. Java must be installed and the system variables set properly (the JAVA_HOME and PATH environment variables) before Jenkins will start working.
  3. Jenkins itself — installed and running as the server that watches the repository.

By default Jenkins listens on port 8080; you can change the port if you need to, but the default is what most first installs use. Port 8080 is Jenkins' well-known address — when you open a browser to localhost:8080, you are talking to the Jenkins server on your machine.

12.3.2 First Login: Unlocking Jenkins

The first access to a new Jenkins instance is not a login — it is an unlock. Jenkins generates an initial admin password automatically, and the new instance asks you to enter it. Why an unlock and not a normal sign-in? On a fresh install there is no user account yet, and no one has set any password; Jenkins creates a one-time secret so the first human to reach the server can prove they control the machine it runs on.

Where to find the password depends on your operating system:

  • On Linux, you read the Jenkins console log output, locate the generated password there, and unlock Jenkins with it. The password appears in the log lines printed when the Jenkins service starts.
  • On Windows, the same initial admin password sits in a specific directory as a file — open that file, copy the password, and enter it. The path is shown in the setup screen itself.

Worked example — the first run: starting a fresh Jenkins instance.

  1. Start the Jenkins service (for example, sudo service jenkins start on a Linux VM).
  2. Open a browser at http://localhost:8080.
  3. The Unlock Jenkins screen appears. On Linux, scroll the console log to find the line beginning with Jenkins initial setup is required. An admin user has been created and a password generated. and copy the long password shown there; on Windows, open the generated password file from the directory the setup screen names.
  4. Paste the password into the unlock field and continue.
  5. The instance now offers the customizing options; once unlocked, you create your own account and move on to customizing the instance.

Sense-check: the unlock password is a one-time bootstrap secret — after you create your own administrator account, you use that account, not the bootstrap password.

Once unlocked, you create your own account and move on to customizing the instance. From that point the server behaves like any secured system: your credentials, your session, your builds.

12.3.3 Connecting Tools through Plugins

Jenkins is a continuous integration system, which means it is meant to be integrated with other tools and technologies. The customization mechanism is plugins — small installable extensions that teach Jenkins how to talk to a specific tool.

The plugin walkthrough:

  • To integrate with Git: go to Manage Jenkins → Manage Plugins, hunt for the Git plugin, install it, and finish the configuration settings. Once installed, Jenkins can clone repositories, watch branches, and read commit information from Git remotes.
  • To work with Maven projects and run Maven builds: go to Manage Jenkins → Configure System and provide the Maven path. Jenkins needs to know where the Maven installation lives so it can invoke mvn inside build jobs.

These exact instructions are already captured in the toolchain document in the reference document folder shared on Teams, so the reference folder is the place to check for the current paths and versions. Paths and versions drift as tools update, so the reference document — not memory — is the source of truth for what to install and where to point Jenkins.

12.3.4 Removing a Plugin

When you no longer work with a particular technology, you can save energy and storage by removing its plugin. There are two removal options.

Worked example — removing the Git plugin, two ways:

Option 1 — from the Jenkins UI: go to Manage Jenkins → Manage Plugins, find the plugin, and click the Uninstall option for that plugin. Jenkins marks it for removal and handles the cleanup.

Option 2 — manually: every plugin exists as a .hpi file inside the plugins directory on the master. Find the matching file — for the Git plugin, git.hpi — and delete it from the folder. That removes the plugin as well.

Sense-check: after either route, the plugin no longer appears in the installed list and its capabilities disappear from Jenkins.

The two options matter because the manual route works even when the UI is slow or the plugin is partially broken. When a broken plugin stops the UI from responding, you can still go to the filesystem and remove the .hpi file directly — the manual route is the escape hatch for exactly the situations where the friendly route is unavailable.

Scope: plugin removal is a per-plugin action, not a way to downgrade Jenkins itself. The .hpi file holds only that plugin's code; removing it does not touch other plugins, the Jenkins configuration, or your jobs. Keep that boundary in mind — the manual deletion is precise, and its reach is limited to the plugin you delete.

Recap: the setup recipe is version control + Java with system variables + Jenkins on port 8080; the first entry is an unlock with an auto-generated admin password (console log on Linux, password file on Windows); tools join through plugins (Git under Manage Plugins, Maven path under Configure System); and plugins leave either through the UI or by deleting the .hpi file on the master.

Bridge: a configured Jenkins server is only a shell until it runs work. The next section explains what a pipeline is and how a Jenkinsfile describes that work.

12.4 Jenkins Pipelines and the Jenkinsfile

12.4.1 What a Pipeline Is

The heart of Jenkins is the pipeline. A Jenkins pipeline is a suite of plugins that supports implementing and integrating a continuous delivery pipeline into Jenkins. The pipeline definition itself is written into a plain text file called the Jenkinsfile.

Everything about a pipeline — what to build, how to test, where to deploy — lives in that file, which is why the pipeline is called "as code". The Jenkinsfile is not a special binary format; it is text, readable by humans and executable by Jenkins, and it travels with the project like any other source file.

Think of the Jenkinsfile as the recipe card for the delivery process: it lists the ingredients (the tools and commands), the order of the steps (stages), and the oven temperature (the agent and environment). A team that changes its build process edits the recipe, not the machine.

12.4.2 Scripted versus Declarative Jenkinsfiles

There are two ways to create a Jenkinsfile. The instructor also described the declarative way as the descriptive way, because it states what should happen rather than how to program it.

Dimension Scripted way Declarative way
Where the definition lives Written inside the Jenkins UI, in the job configuration Stored as a separate file outside the UI, next to your project (.jenkins file)
Style Full Groovy scripting — code-like, programmatic Structured blocks that describe stages and steps
Best for Quick experiments inside a job Pipeline-as-code that lives in the repository

The shorthand: scripted means the script lives in the Jenkins UI; declarative means the file lives outside it, next to your project. That placement difference is the whole point — a file next to the project is versioned, reviewed, and tracked like the code itself, while a script buried in the UI is tied to one server's configuration.

12.4.3 Three Ways to Structure a Pipeline

Even with the Jenkinsfile concept in place, there are three ways to structure a pipeline in Jenkins.

  1. Single pipeline job — create a single job of type Pipeline and define everything inside it.
  2. Three chained jobs — create three different jobs — one performing the build, one delivering to staging, and one deploying to production — and trigger them one after another: once the build job succeeds it automatically triggers the staging job, and once that succeeds it triggers the deployment job.
  3. Pipeline job with embedded script — create a pipeline job and embed the Jenkins script directly in it.

The second option is the classic job-chaining pattern; the first and third are the pipeline-as-code patterns.

The difference between the two pipeline-as-code options is where the definition lives: option 1 is the scripted approach (defined inside the job), and option 3 embeds the script into the pipeline job itself. The chained-jobs approach (option 2) shows its structure through the jobs themselves — each job is one stage, and the triggers are the arrows between them.

12.4.4 Reading a Jenkinsfile

A minimal Jenkinsfile has a recognizable skeleton. It opens with a pipeline block, then declares agent any, and then carries multiple stages. In the example discussed, the stages are build, test, and deploy — the processes you want this Jenkinsfile to accomplish.

Each of these keywords has a precise meaning:

  • agent — indicates that Jenkins should allocate an executor and a workspace for this part of the pipeline. agent any means Jenkins runs the pipeline on whatever available agent it finds.
  • stages — describes the stages of the pipeline, the big phases of work.
  • steps — the steps that have to be executed inside a particular stage.
  • sh — executes the given shell command; the workhorse for Linux commands inside a stage.
  • junit — a pipeline step provided by the plugins to perform unit tests, used in the example's test stage.

So the shape of the file mirrors the shape of the workflow: an agent to run on, stages to organize the work, and steps inside each stage to do the actual commands.

Worked example — a minimal Jenkinsfile, read line by line:

pipeline {
    agent any
    stages {
        stage('Build') {
            steps {
                sh 'mvn clean install'
            }
        }
        stage('Test') {
            steps {
                junit 'target/surefire-reports/*.xml'
            }
        }
        stage('Deploy') {
            steps {
                sh 'make publish'
            }
        }
    }
}

Walk through the structure: the pipeline block wraps everything. agent any tells Jenkins to run on any available agent. Inside stages, three stage blocks appear in order — Build runs mvn clean install through sh, Test hands the JUnit report files to the junit step, and Deploy runs the publish command. The file executes top to bottom, and each stage gets its own executor workspace under the same agent. Sense-check: the keywords in the file map one-to-one to the pipeline phases the lecture teaches — build compiles, test verifies, deploy ships.

12.4.5 Build, Test, and Deploy in Detail

Each stage was walked through in detail.

The build stage performs compilation and creates an artifact. Whatever sub-actions are relevant for a build happen here: for a Maven project you run mvn clean and then mvn install — the two commands you use when working with Maven. clean removes the previous build output so the build starts fresh, and install compiles, tests, and places the resulting artifact into the local repository. Depending on the technology and the build process, you write the corresponding commands in the build step. Once the artifact is generated, you decide where to push it: the Archive Artifacts plugin archives the artifact to a target location, which in a real organization is generally the artifact repository.

The test stage runs the tests, and here the commands change with the kind of testing and the technology: if you are running Selenium tests the command is different from a JUnit run, and in the example the tests are JUnit tests. The test stage's job is to prove the build before anything ships; its output — the test reports — is what the team reads to decide whether to proceed.

The deploy stage decides where the artifact goes. The sequence taught is defensive: first check whether the build is null or not and whether the result is success; if the build is successful and there is output from the build process, then push the artifact — "make publish" — to the location you provide. That location can be an AWS S3 bucket, an AWS EC2 instance, an Azure cloud target, or even a folder on your local system. The pipeline does not care where; your job is to configure where.

Pitfall: deploying without a success check. The defensive pattern exists because a failed build can still leave half-written output, and pushing that output would ship broken software. The checks — build is not null, result is success, output exists — gate the publish so deployment only ever sees a passing build.

12.4.6 Separate Jobs or a Single Jenkinsfile?

Before explaining the benefits of a single Jenkinsfile, the instructor paused and asked the class directly which structure they preferred — three separate jobs chained together, or one Jenkinsfile. The answers split the room:

Q: Which is better: creating three different jobs and triggering them one after another, or creating a single Jenkinsfile pipeline?

A: Both answers have merit. One view: separate jobs give you better control. And for a person understanding Jenkins for the first time, three different jobs are genuinely better, because you get a clear understanding of segregating the task and you study each stage thoroughly. But once you have hands-on experience with Jenkins, it is preferable to write a Jenkinsfile. Another student added a strong reason: a Jenkinsfile is a genuine source code, so it is easy to manage — you can version it, review it, and track it like any other code.

The follow-up question — "can anybody tell me why the Jenkinsfile is better?" — produced the answer that the Jenkinsfile gets every benefit of a version control system, which is exactly the topic of the next section.

Worked example — the three-job chain in motion:

  1. Job build checks out the code and compiles it. It succeeds and stores the artifact.
  2. The success trigger fires: job staging starts automatically, takes the artifact, and delivers it to the staging environment. It succeeds.
  3. The staging job's success trigger fires: job production starts and deploys the artifact to the production environment.

Sense-check: each job is one stage, and the failure at any step stops the chain — a red build job never triggers staging, so broken work never reaches production. This is the classic job-chaining pattern.

Recap: a pipeline is a Jenkinsfile — plain text describing what to build, how to test, and where to deploy; scripted versions live in the UI while declarative ones live as a file next to the project; there are three structures (single pipeline job, three chained jobs, pipeline job with embedded script); and the file's keywords (agent, stages, steps, sh, junit) mirror the workflow shape.

Bridge: the class debate ended with "the Jenkinsfile gets every benefit of a version control system" — the next section unpacks exactly what those benefits are.

12.5 Why Use a Jenkinsfile

12.5.1 The Four Benefits

Once you have hands-on comfort with Jenkins, the Jenkinsfile becomes the preferred approach, and there are four concrete reasons.

1. It is source code. Whatever opportunities exist for managing source code with a version control system apply to the Jenkinsfile. Your team gains collaboration — the ability to distribute work efficiently, see logs, track history and know who made what changes, and roll back in case of a disaster. You can keep the Jenkinsfile in the same GitHub repository as your source code, which is elegant: the file that says what to do with the code lives right next to the code it acts on. The team can edit, review, and merge Jenkinsfile changes with the same review flow as application code.

2. It is durable. Pipelines written as a Jenkinsfile survive both planned and unplanned restarts of the Jenkins master. A script is a script — restarting the server does not erase the definition, because it is stored as text, not in some ephemeral UI state. When the master crashes and comes back, the pipeline definition is still there, waiting in the repository.

3. It can pause. Pipelines can automatically stop and wait for human input or approval before continuing. Jenkins has plugins for manual intervention, so you place a pause wherever a human gate is needed; the pipeline stops there and waits until a team member addresses the input, and then the pipeline continues — not restarts, continues. The pause is the pipeline's way of saying "this step needs a human decision," and after the decision it resumes from exactly where it stopped.

4. It is versatile. You can perform work in parallel. The Jenkinsfile lets you run independent branches of work side by side instead of waiting for everything serially. A test suite can split across several environments at once, and independent stages do not have to queue behind each other.

The first benefit is the root of the other three. Because the Jenkinsfile is source code, it gets history and rollback (disaster recovery), it survives as durable text (restarts), it can carry explicit human gates (pauses), and it can express complex shapes like parallel work. What the class concluded in the previous section is now spelled out: the Jenkinsfile gets every benefit of a version control system.

12.5.2 The End-to-End Pipeline Flow

The full pipeline picture ties the pieces together.

On your development system you push code and commit it to a repository; the specific repository and branch name now holds the code change. The moment the code change lands on that repository, the workflow kicks off:

  1. SCM checkout — the first thing the pipeline does is pull the code from the version control system into the workspace.
  2. Build — during the build, the process collects the dependencies needed by the build process. Different modules may use different technology: module one might be Java, while module two could be Python — and Python needs no build tool at all, you simply run that .py file and it is done. Depending on the technologies used, your build processes differ, and you can run those build processes in parallel.
  3. Testing — you can perform parallel testing by pushing the artifact to several environments at once — the staging environment, a capacity environment, a user interface smoke test environment — and run the automation against each.
  4. Deploy — the test results come back; if they are clear, the pipeline proceeds to deploy. Once the artifact is deployed on the production environment, the workflow ends.
Stage What happens Can it run in parallel?
SCM checkout Pull code from version control No — everything depends on it
Build Compile + collect dependencies Yes — different modules with different tools
Testing Run automation against several environments Yes — staging, capacity, UI smoke test at once
Deploy Push the artifact to production No — the final step

12.5.3 Where Organizations Draw the Automation Line

Not every organization runs the full flow automatically. There are organizations that stop their automation at the testing phase and do the production release manually, by human action. And there are organizations that fully deliver the code all the way to the production environment through automation.

Both are real industry postures; the pipeline definition makes either one explicit. The posture is a choice baked into the Jenkinsfile: a pause before production means manual release, and no pause means full automation.

Scope: the automation line is an organizational decision, not a technical one. A fully automated path to production is the modern DevOps target, but the manual-release posture is common in regulated industries where a human approval gate at the deploy stage is a compliance requirement — exactly the kind of pause the Jenkinsfile supports with its manual intervention plugins. Both pipelines look identical to Jenkins; the difference is the gate you place in the definition.

Real-world: in banking and healthcare, audit trails demand a named human who approved each release, so those teams run the pipeline to the deploy gate and stop; in consumer internet companies like Amazon and Netflix, the pipeline runs to production without a human in the path, because release frequency matters more than the approval ceremony. The same Jenkinsfile language expresses both postures — that is the practical value of a pipeline defined as code.

Recap: the Jenkinsfile wins on four counts — it is source code (history, review, rollback), durable across master restarts, able to pause for human input, and able to run work in parallel. The end-to-end flow is checkout → build (with dependency collection) → parallel testing → deploy, and where the automation line stops (manual release versus full automation) is a choice the file makes explicit.

Bridge: one Jenkinsfile per project works well — until a project has many branches doing different things. The next section shows the multi-branch pipeline, where Jenkins discovers branches automatically.

12.6 Multi-Branch Pipelines

12.6.1 What Multi-Branch Solves

The multi-branch pipeline project type is described as a genuinely interesting Jenkins feature. It enables you to implement different Jenkinsfiles for different branches of the same project.

Why would one project need several pipeline definitions? Think about microservice architecture based code: different branches mean different features, and different features may use different tools and technologies. A feature branch that introduces a new Node.js service has different build commands from a branch touching the Java backend — so you can keep a segregated Jenkinsfile for each branch, and each branch's pipeline matches its own technology.

The mechanism is discovery. In a multi-branch pipeline project, Jenkins automatically discovers, manages, and executes the pipelines for branches that contain a Jenkinsfile in their source code. Jenkins scans the repository, finds every branch that carries a Jenkinsfile, creates a pipeline run for it, and keeps those pipelines up to date as branches appear and disappear.

That makes it mandatory that every branch should have a Jenkinsfile for the multi-branch feature to run — a branch without a Jenkinsfile is simply invisible to the multi-branch project.

Because discovery is automatic, the need for manual pipeline creation and job management disappears — new branches with a Jenkinsfile simply start flowing through CI/CD. A developer creates a branch, pushes a Jenkinsfile with it, and the pipeline exists. No one has to go into the Jenkins UI and create a job for the branch; Jenkins notices it on the next scan.

12.6.2 Creating a Multi-Branch Project

The creation walkthrough is short.

Worked example — creating a multi-branch pipeline project:

  1. Select the multi-branch pipeline feature from the new-item menu.
  2. Give the project a name, for example payment-service-pipelines, and click OK — the multi-branch job is created.
  3. Add a branch source — for example Git — and enter the location of the particular repository (the URL Jenkins should clone).
  4. Save the multi-branch pipeline project.

That is the whole setup: name, branch source, repository location, save. Jenkins now watches that repository, discovers every branch containing a Jenkinsfile, and runs each branch's pipeline. Sense-check: four actions — name, source, location, save — and the per-branch jobs are created for you from that point on.

12.6.3 Triggers and Environment Variables

Two more settings matter.

First, the build trigger interval: you decide when the build should be triggered — periodically on an interval (every 30 minutes, every hour, whatever fits), remotely from a script, or immediately when the source code has been changed. The interval is the discovery heartbeat: with a 30-minute interval, Jenkins rescans the repository every half hour for new branches and new commits; the remote trigger lets an external script (or a repository hook) tell Jenkins to scan now; and the change-based trigger reacts the moment source code changes.

Second, extra environment variables help you identify what is running:

  • The branch name variable carries the name of the branch this pipeline is executing for — for example master — so the team understands which branch a multi-branch job was created for.
  • The change id variable is an identifier corresponding to some kind of change request, such as a pull request number; providing it makes clear for which particular change this branch was triggered or created.

Both variables turn an anonymous automated run into a traceable event. Without them, a run is just "some pipeline execution"; with them, the logs and notifications say "this run belongs to branch feature/login and pull request #42." That traceability is what lets a team look at a failing build and immediately know which work caused it.

The Jenkins portal has good tutorials and documentation for multi-branch pipelines, and the upcoming tutorial session will show a complete CI/CD pipeline, so this is a feature to explore hands-on.

Pitfall: forgetting the Jenkinsfile on a branch. The multi-branch project only discovers branches that contain a Jenkinsfile — a branch pushed without one is silently skipped, so its changes never get built or tested. And a stale trigger interval means new branches are discovered late, so set the interval to match how fast your team expects feedback.

Recap: multi-branch pipelines let each branch of a project run its own Jenkinsfile; Jenkins discovers branches automatically, so no manual job creation is needed; setup is name + branch source + repository location + save; and the branch name and change id variables make each automated run traceable.

Bridge: a pipeline produces artifacts, and each run leaves something behind. The next section looks at the other side of delivery — where those artifacts live and why they need a home of their own.

12.7 Artifact Management

12.7.1 What Counts as an Artifact

An artifact is the output of any step in the software development process — "any step" on purpose. The word is broader than the compiled binary most people associate with "build output" — every phase of the lifecycle produces artifacts, and they all need managing.

Worked example — artifacts from three phases of one project:

Lifecycle phase Artifact produced
Requirement analysis The POC or specification document
Design Mock diagrams, low-level and high-level designs, class diagrams
Code The output file created once you run the code — a jar, a library, or the application itself

So artifacts are many different things: jar files and libraries, an application itself, or your documentation. Sense-check: the same project produces a spec in week one, a class diagram in month two, and a compiled jar at the end — all of them are artifacts, and all of them are worth keeping in a managed place.

The breadth matters for one reason: if every phase produces something worth keeping, then "manage your artifacts" is not a build-time chore — it is a whole-lifecycle discipline.

12.7.2 What an Artifact Repository Provides

An artifact repository serves three roles in an organization.

  1. Central point of management — it is the central point for the management of all binaries, dependencies, and libraries. Everything the build consumes and produces has one known home.
  2. Configurable proxy — it acts as a proxy between the organization and the public repository. Some binaries and libraries are accessed from public sources, and the repository sits between the two as a controlled gateway: teams ask the internal repository, and the internal repository fetches from the public internet on their behalf.
  3. Promotion record — it provides an integrated record for build promotions of internally developed software, so you can see the history of how artifacts moved through environments — from build to staging to production, with the status of each step recorded.

These three services — central management, proxy, and promotion record — are what justify having a repository at all.

12.7.3 Tools in the Market

Several tools and technologies manage artifacts via an artifact repository. The named ones are JFrog (Artifactory), Nexus, Maven, and Helix Core.

JFrog has earned the most attention in the market when it comes to artifacts — the instructor notes you have almost certainly heard of it — but Nexus and Helix Core are legitimate alternatives, and Maven itself plays a role in artifact management alongside its build duties. Maven is the interesting case: it is primarily a build tool, but its local repository (~/.m2/repository) and its publish workflow make it a natural part of artifact handling in Java projects.

Real-world: JFrog Artifactory and Sonatype Nexus are the two names that dominate industry artifact storage; a typical enterprise CI/CD stack pairs Jenkins with one of them, with Maven handling the build-to-repository handoff. When you see a DevOps job description asking for "binary repository management," it is usually asking for Artifactory or Nexus.

12.7.4 Choosing a Tool: the Feature Checklist

When you opt for an artifact repository, you should check whether the tool supports the features that matter. The checklist given in class has five items:

  • Secure — do you get secure access to the repository and its contents?
  • Trusted — can you trust the tool and its ecosystem, including its community and maintenance?
  • Stable — is the repository reliable under real use?
  • Accessible — can you perform and also restrict accessibility, so access control to the repository is in your hands?
  • Version — does the tool let you perform versioning, i.e., version control for the artifacts themselves?

These are the five things to look for when identifying and starting to use an artifact management tool. You can hold any candidate tool against this checklist: a repository that is fast but cannot version its artifacts fails the checklist, and so does one that stores artifacts but offers no access control.

12.7.5 Repository versus Shared Folder

The instructor turned the rationale for a repository into a class discussion: why is an artifact repository a better place for dependencies and libraries than a simple folder structure?

Q: Why is an artifact repository better than just creating a folder structure where we keep our dependencies and libraries?

A: Three reasons. First, versioning: you can trace back which artifact was working fine and roll back to that particular artifact in any case of emergency. Second, central dependency management: everyone uses the same artifact, the same libraries, the same dependencies, so there is very little chance of dependency hell issues or compatibility issues. Third, better collaboration: the team knows exactly where an artifact is located.

The follow-up points complete the picture. Because everyone consumes the same packages under the same names, compatibility problems shrink dramatically — one team's library version can no longer drift from another team's. Version control also makes it easy to track artifacts that are no longer being used, and remove them, which keeps the repository clean. An artifact repository also lets you treat your dependencies statically: some repository systems store only a single version of a package at a time, so to keep distinct versions of your project, you segregate the versions deliberately in the repository.

12.7.6 The "Works on My Laptop" Problem

There is a famous failure mode in software teams: during a demo, "it was working on my system — not sure why it is not working in this particular environment." An artifact repository is the structural fix for the works-on-my-laptop syndrome.

Ideally your local development environment has the same access to the internal artifact repository as every other build and deploy machine in your environment, so everyone consumes the same packages: whatever dependencies and libraries you use are the same overall, whether you are on your local system or on any other system in your team.

The repository even removes the dependency on the internet: it gives your organization its own universe. Whatever is written in the requirements.txt of your project is already available inside the artifact management repository, so the team can work without internet access. The deeper argument is ownership: relying on the internet for your dependencies means somebody else ultimately owns the availability and consistency of your build. Many organizations avoid exactly that by managing artifacts in their own repository rather than from public internet sources.

Pitfall: treating the laptop as the source of truth. The moment one developer's machine holds a library version nobody else has, the works-on-my-laptop failure is built in — the demo works locally and breaks everywhere else. The fix is structural: every machine pulls from the same internal repository, so the laptop is just another consumer, not a store.

12.7.7 Single Source of Truth

An artifact repository organizes and manages binaries and their metadata in one central place, giving the organization a single source of truth for everything the build consumes and produces.

Concretely, it allows teams to easily find the correct version of a given artifact; developers can push to and pull from the artifact repository as part of the DevOps workflow; and because everyone is using the correct files, the repository improves the way teams work together and makes the CI/CD pipeline more reliable.

When you write the build script, instead of pointing the dependency download at local or internet sources, you provide the artifact repository URL so the build grabs those libraries and binaries from the central place. That one URL change, plus the central management behind it, is the ultimate benefit of running a binary repository manager in your organization.

Recap: an artifact is the output of any lifecycle step — spec documents, class diagrams, jars, libraries, the app itself. A repository is the central management point, a proxy to public sources, and the promotion record; JFrog and Nexus dominate the market; the choice checklist is secure, trusted, stable, accessible, version; and a repository fixes works-on-my-laptop by giving every machine the same packages and the organization its own universe.

Bridge: one team's real practice — keeping artifacts on GitHub — triggered a class discussion that is worth preserving in full. The next section captures that conversation.

12.8 Team Discussion: Git, Artifactory, and Real Practices

12.8.1 Keeping Artifacts Out of the Source Repository

A student shared their team's actual practice, and the discussion that followed is a useful window into real-world tooling choices.

Q: We use GitHub Actions for our pipelines. The outputs are stored on GitHub itself — after compilation we generate the libraries and store them there, and the different repositories directly refer to that built code. So we do not need an extra artifact management tool like JFrog or Nexus anymore.

A: Understood — so in your team you are keeping the source code and the artifact in the same repository for the same project. Frankly speaking, if you look for best practices, it has always been suggested that the artifact and the source code should not be in the same repository — they should be segregated. But tell me more about how that works for you.

The student clarified: the built library is not part of the code base — when you do a git clone you do not get the current library versions; instead, tags show the different versions of the code, and other teams refer to a particular version of the library — the code bundle, not the code. In their frontend work, the source code is totally different from the bundle. The instructor accepted the refinement: if the build is not part of what you clone, then keeping both on the same platform makes sense — but even then, segregate the two paths on the platform.

The instructor then broadened the point. Jenkins itself does keep artifacts: when you run a Jenkins build, the artifacts are created in the Jenkins workspace, and those artifacts carry a timeline — on which date that artifact was created. But when organizations want a standardized process, they follow the standards and opt for a dedicated set of tools for each job; they do not want Jenkins serving as both continuous integration and artifact repository at once.

Best practice: keep the artifact and the source code segregated rather than in the same repository. Source code changes constantly and is reviewed; artifacts are versioned products of builds. Mixing them bloats the repository, pollutes the review history, and makes the build output part of the code base. That is why dedicated tools came into the picture with extended features: Jenkins does not have the huge artifact features JFrog has, and GitHub also cannot give you the extensive artifact handling JFrog offers.

Depending on the requirement set, an industry either opts for a dedicated tool or uses a single platform to complete the defined job — the student's team chose the GitHub platform, and that works for their defined job. The guideline is not a law; it is a default that teams may deviate from when their setup separates build output from cloned source, as the student's team does.

12.8.2 Git versus Artifactory

A student asked about version control: what is the difference between Git and Artifactory, and when should you use which one?

Q: What is the difference in terms of version control between Git and Artifactory? When do you choose which one?

A: I have not worked on Artifactory, but I am sure about Git — that is what we design for in this course. The best part of Git is that you can implement both centralized and distributed ways of working. For a team that is really new and not even aware of branches and feature flows, working with Git is easy: the only difference is they are changing the command, the way of work is the same — they are using the centralized way, and they use the internet only for push and pull, not for working with branches. With Git it becomes easier to shift from centralized to a distributed way of working. Git is very fast, but at the same time it is very simple to understand. And Git has a strong suggestion engine: if you miss any single line or misplace any wording in a command, Git suggests the particular command you probably missed — that is why people generally tend to opt for Git.

The exchange closed with a candid note: the instructor has not personally worked with Artifactory and did not want to confuse anyone by guessing about it, but the reasoning for Git is first-hand and detailed. A separate student question — "are you sure Artifactory is for artifact management?" — got the same honest answer: not entirely sure, since it has not been explored deeply, but the discussion group agreed it fits the artifact management role.

Dimension Git Artifactory (artifact repositories)
What it versions Source history — code and its changes Artifacts — binaries, libraries, build outputs
Working styles Centralized and distributed both supported Central store, accessed by build and deploy machines
Collaboration model Teams clone, branch, merge Teams push and pull packages under versioned coordinates
Typical answer "What changed, and who changed it?" "Which version of this library is correct?"

The takeaway that survives the uncertainty: an artifact management tool and a version control system are different categories of software, even though both deal with versions of things — Git manages source history, while Artifactory-style tools manage artifacts.

12.8.3 Docker Images in an Artifact Repository

Another student connected the dots to containers: if we store Docker images and the image artifacts in Artifactory, then Artifactory is the artifact repository.

Q: We store the Docker images and the artifact images in Artifactory — then Artifactory is the artifact repository, right?

A: Yes, I would go with that. It is similar to Nexus, so definitely yes — it is an artifact repository. It is not a version control system; it is an artifact management tool.

That distinction was reinforced: an artifact management tool and a version control system are different categories of software, even though both deal with versions of things. Docker registries and binary repositories manage artifacts; Git manages source history. Container images are versioned products — exactly what an artifact repository is built to hold.

12.8.4 Guidance for Late Joiners and Non-Coders

A student who joined late asked for a quick overview of the assignments, since the class calendar had not shown the session. The overview for non-coders: for the Git and GitHub assignment you just need to learn the GitHub commands; for Jenkins you do not have to write code at all — hunt for any publicly available code on a GitHub repository, clone it into your local system, and start working; for Selenium you have to understand the script and how Selenium works, then start writing the script in the language you are comfortable with.

Q: We joined a bit late and missed the assignment overview. Could you go through it again?

A: Git or Selenium will be easy for non-coders, and Jenkins will also be easy — you do not have to write any code, you can hunt for publicly available code from a GitHub repository, clone it to your local system, and start working. For Git and GitHub you just need to learn the GitHub commands. For Selenium you need to understand the script and the way of working in whatever language you are comfortable with. Same goes for Jenkins — there is really very little code involved.

In short, Git and Selenium will be easy for non-coders, and Jenkins is also easy because the amount of code you have to write is very small. The three assignments were designed to be reachable without a programming background: the Git assignment is command practice, the Jenkins assignment reuses public code, and the Selenium assignment needs script understanding more than original programming.

Recap: the discussion's three results — best practice keeps artifacts segregated from source code (though a platform-only setup works when the clone excludes the build output); Git and artifact repositories are different categories of software even though both version things; and the three lab assignments are deliberately reachable for non-coders.

Bridge: with the assignment, Jenkins, and artifact picture complete, the session closed with a bonus topic — the master–slave topology — and a preview of the heavier session ahead.

12.9 Bonus: Master–Slave Topology and What Comes Next

12.9.1 The Master–Slave Setup

The Jenkins master–slave topology was introduced as a deeper topic to check in the tutorial session. It is the answer to a scaling question: what happens when one Jenkins server becomes the bottleneck for every build, test, and deploy in the organization?

In this setup you have one master instance, and the slaves do the work: one slave performs the build, one slave performs the test, and the master collaborates all the results and pushes the work to the delivery and deployment stage. The master coordinates; the slaves execute; the division of labor makes the CI/CD system scale.

The picture: a master node in the center, connected to several slave nodes around it. The master owns the configuration, the job definitions, and the results; each slave owns an executor and a workspace. When a job arrives, the master assigns it to a slave, the slave runs the steps, and the results flow back to the master.

The benefit of the division: the master is no longer doing heavy compilation work itself, so it stays responsive, and the team can add slaves when demand grows. The topology is why agent any in a Jenkinsfile works the way it does — Jenkins picks whichever available agent (slave) can take the work.

12.9.2 The Bonus Point Option

There is an optional bonus point attached to the Jenkins assignment. It is framed carefully: you can replace the three tasks of the assignment with a single bonus point task and score the same points — it does not carry extra points. It is an opportunity to explore more, not a requirement. If you skip it, there are no deductions; it is purely for your own learning.

Exam note: the bonus point scores the same marks as the three tasks it replaces, adds no extra points, and skipping it carries no deduction — so it is a genuine choice for students who want to explore master–slave Jenkins. Reading the terms carefully: "bonus" here means a swap, not extra credit.

The bonus work centers on the architecture: create the structure showing your Jenkins master server connected to all the different tools and technologies, with the artifact handling ready. You can simply showcase the architecture diagram in the documentation part and upload it over the portal. The diagram should show the master at the center, the connected tools (such as Git, Maven, SonarQube), and the artifact repository — the full topology this lecture has described in words, drawn as a picture.

Pitfall: misreading the bonus as free extra marks. It replaces the three tasks with one task and scores the same marks — so it is worth the same, not more. Choose it only if the master–slave architecture work genuinely interests you; the standard three tasks are equally valid and equally graded.

12.9.3 What Comes Next

The agenda for this session was deliberately light — just Jenkins and artifact management. The next session is expected to be bulkier: it starts covering deployment strategies and managing infrastructure.

Those topics will take more time and more discussion, so this short session was the calm before that. Deployment strategies — how new versions reach production with minimal risk — and infrastructure management — how the environments themselves are created, configured, and maintained — are the natural follow-ons to everything in this lecture: a pipeline delivers the artifact, and the deployment strategy decides how the artifact lands.

Recap: the master–slave topology splits coordination (master) from execution (slaves) so CI/CD scales; the Jenkins bonus swaps the three tasks for one equal-value architecture task (master connected to all tools, artifact handling ready) with no penalty for skipping; and the next session moves on to deployment strategies and managing infrastructure.

Exam Guidance Summary

No exam-specific questions were discussed in this session, but there is substantial evaluation guidance tied to the assignments, which are graded outputs for the course.

  • Deadline and window: assignment documents are published on the portal the same day, and submissions are accepted until the 6th of November — about four weeks of time, which the instructor considers plenty.
  • Demo-based evaluation: lab assignments are graded through a demo — either a screen video uploaded to the shared Google Drive, or a screenshots document (convertible to PDF) uploaded to the portal. For video submitters, a short document naming you, the problem number solved, and the drive location must also be submitted on the portal, because grading requires a portal submission.
  • Folder naming: use your Bits ID and the problem number you solved as the drive folder name so evaluators can identify the assignment being assessed.
  • Plagiarism: the case study submissions go through a plagiarism check; copying content from internet sources drops the score once plagiarism exceeds 30%. Lab assignments have no plagiarism concern because the work is performed by you.
  • Choice mechanics: pick any one of the three lab problems (Git and GitHub, Selenium, Jenkins CI/CD), or complete both case study problems (posted as Case Study A and B). The problems are individual work.
  • Case study highlights: highlights are provided for the case studies so there is a starting point — a direction to work from, not a finished answer.
  • Bonus point: the Jenkins bonus point replaces the three tasks with one task, scores the same marks, adds no extra points, and brings no deduction if skipped — it is for your own learning, and the architecture diagram can be showcased in the document submitted on the portal.
  • Schedule relevance: the tutorial session on the 18th is purely on Jenkins (including the master–slave demo and a complete CI/CD pipeline), which directly supports assignment 3; makeup examinations take place next Sunday, when there is no class.

Exam note: the two evaluation facts most likely to cost marks are the portal submission (the video alone does not complete grading — the document with your name, problem number, and drive location must go on the portal) and the plagiarism threshold (case studies scoring above 30% plagiarism get a lower score).

Key Industry Applications

  • Jenkins in CI/CD: the industry-standard open source continuous integration server, with more than 1400 plugins (close to 1500) contributed by a large community; used to automate build, test, and deployment pipelines in countless organizations. Because it runs on Java and accepts plugins for nearly every tool, it remains the default choice for teams that want control over their delivery chain.
  • Pipeline as code: Jenkinsfiles stored in the same repository as source code give teams version control, code review, rollback, durability across master restarts, human approval gates, and parallel execution — the modern way CI/CD definitions are managed. The file that says what to do with the code sits next to the code it acts on.
  • SonarQube integration: connecting Jenkins to SonarQube requires installing the plugin plus creating a session key in Jenkins configuration — a realistic example of why Jenkins configuration skill is valued in industry. Code-quality gates in real pipelines work exactly this way: plugin plus credentials plus settings.
  • Team practice with GitHub Actions: at least one team reported running pipelines entirely on GitHub Actions and storing built libraries on GitHub, referencing specific tagged versions from other repositories — a genuine industry alternative to a separate artifact server, provided the build output stays out of the cloned source.
  • Artifact repositories: JFrog Artifactory and Nexus dominate industry artifact storage; organizations run them as a configurable proxy to public repositories, giving the build a single source of truth and letting teams work without internet dependency. Enterprise stacks typically pair Jenkins with one of them, with Maven handling the build-to-repository handoff.
  • Microservice development: multi-branch pipelines are heavily used for microservice architecture based code, where each branch carries its own Jenkinsfile and Jenkins discovers it automatically — new branches flow through CI/CD without manual job creation.
  • Cloud and local deployment: artifacts are pushed to AWS S3 buckets or EC2 instances, Azure cloud targets, or local staging and production virtual machines — delivery to staging and deployment to production are the standard two-environment pattern that the Jenkinsfile's deploy stage makes explicit.
  • Test automation: Selenium WebDriver (free, Python or Java) for browser test automation, with element inspection via the browser's Inspect tool, plus JUnit test steps inside Jenkins pipelines — the same pattern real QA teams run against their web products.

ITD Lecture 12 notes · Jenkins and Artifact Management

Introduction to Devops· postgraduate· 2026-08-14

Sections Breakdown

112.1 Assignment Bank and Submission

The five-problem assignment bank: the three lab tracks (Git and GitHub, Selenium, Jenkins CI/CD), the paired case studies, and the submission rules — demos, portal documents, the plagiarism check, and the 6th of November deadline.

212.2 Jenkins: History and Open-Source Roots

How Hudson became Jenkins: the 2004 origins under Kohsuke Kawaguchi at Sun, the Oracle split, the 1400+ plugin community, and why a configurable open-source tool beats encapsulated ones like TeamCity for learning.

312.3 Setting Up a Jenkins Environment

The prerequisites for a Jenkins install (version control, Java with system variables, the server on port 8080), unlocking the first login, connecting tools through plugins, and removing a plugin two ways.

412.4 Jenkins Pipelines and the Jenkinsfile

What a pipeline is, scripted versus declarative Jenkinsfiles, the three ways to structure a pipeline, and reading a Jenkinsfile line by line — agent, stages, steps, sh, and junit.

512.5 Why Use a Jenkinsfile

The four benefits of a Jenkinsfile — source code, durable, pausable, versatile — the end-to-end pipeline flow from checkout to deploy, and where organizations draw the automation line.

612.6 Multi-Branch Pipelines

How multi-branch pipeline projects let each branch run its own Jenkinsfile: automatic discovery, the four-step creation, trigger intervals, and the branch name and change id variables.

712.7 Artifact Management

What counts as an artifact, the three roles of an artifact repository, the market tools (JFrog, Nexus, Maven, Helix Core), the five-point choice checklist, and why a repository fixes the works-on-my-laptop problem.

812.8 Team Discussion: Git, Artifactory, and Real Practices

The class discussion: keeping artifacts out of the source repository, Git versus Artifactory as different categories of software, Docker images in an artifact repository, and guidance for non-coders.

912.9 Bonus: Master–Slave Topology and What Comes Next

The Jenkins master–slave topology, the equal-score bonus point for the architecture diagram, and the preview of deployment strategies and infrastructure management.

10Exam Guidance Summary

The evaluation guidance tied to the assignments: the 6th of November deadline, demo-based grading, the mandatory portal submission, the 30% plagiarism threshold, and the bonus-point mechanics.

11Key Industry Applications

Jenkins as the industry-standard CI server, pipeline-as-code, SonarQube integration, GitHub Actions as a team practice, JFrog and Nexus artifact storage, microservice multi-branch pipelines, and cloud versus local deployment.

Postgraduate students of software engineering and delivery

Exam Revision Notes

Below is the distilled, exam-ready core. Every entry comes from the full explanation above. Use this section for rapid review; return to the main notes when a point needs more context.

Assignment Bank and Submission

Must-know: Pick any one lab (Git and GitHub, Selenium, Jenkins CI/CD) or both case studies (4 and 5); labs need a demo (video or screenshots), the portal submission with your Bits ID + problem number is mandatory for grading, case studies are plagiarism-checked with a 30% threshold, and the deadline is the 6th of November.

⚠️ Top pitfall: Uploading only the video without the portal document — grading cannot be completed without the portal submission naming you, the problem number, and the drive location.

Self-check: Which two paths can you choose from the five-problem bank, and how does the submission process differ between video and screenshot demos?

Connects to: Section 12.2

Jenkins: History and Open-Source Roots

Must-know: Jenkins = Hudson forked in 2004 (Kawaguchi, Sun) after Oracle wanted to make it proprietary; it stayed open source with a 1400+ plugin community; unlike encapsulated tools like TeamCity, Jenkins requires thorough configuration (installing the SonarQube plugin is not enough — you also need a session key and configuration settings), and open source is why the course can run the whole CI/CD practice on one laptop.

⚠️ Top pitfall: Expecting a Jenkins plugin to work right after installation — the plugin must be interconnected with configuration settings and credentials such as the SonarQube session key.

Self-check: What was the trigger for the Hudson-to-Jenkins split, and what does the SonarQube example show about how Jenkins integrations work?

Connects to: Section 12.1, Section 12.3

Setting Up a Jenkins Environment

Must-know: Prerequisites: version control, Java/JVM with system variables set, Jenkins on port 8080. First login is an unlock with the auto-generated initial admin password (Linux: console log; Windows: password file), then create your own account. Plugins install under Manage Jenkins → Manage Plugins (Git) and Maven path goes under Configure System; uninstalling uses the UI or deleting the .hpi file in the plugins directory on the master.

⚠️ Top pitfall: Treating the first screen as a normal login — the initial admin password is generated by Jenkins and must be read from the console log (Linux) or the password file (Windows) before you can unlock and create your own account.

Self-check: Where do you find the initial admin password on Windows, and what are the two ways to remove a plugin?

Connects to: Section 12.2, Section 12.4

Jenkins Pipelines and the Jenkinsfile

Must-know: Pipeline = suite of plugins for continuous delivery; the definition lives in a plain-text Jenkinsfile. Scripted = written in the Jenkins UI; declarative = separate file next to the project. Three structures: single pipeline job, three chained jobs triggered on success, pipeline job with embedded script. Jenkinsfile skeleton: pipeline { agent any; stages { build/test/deploy } } with sh and junit steps; deploy checks the build succeeded before publishing.

⚠️ Top pitfall: Deploying without the defensive checks — the deploy stage must first verify the build is not null and the result is success before pushing the artifact, otherwise a failed build's half-written output can ship.

Self-check: Name the three ways to structure a pipeline and say which keywords a minimal Jenkinsfile uses, in order.

Connects to: Section 12.3, Section 12.5

Why Use a Jenkinsfile

Must-know: Four Jenkinsfile benefits: source code (history, review, rollback, collaboration), durable across master restarts, can pause for human input and continue (not restart), and versatile with parallel work. Pipeline flow: commit → SCM checkout → build + dependency collection (parallelizable per module) → parallel testing on several environments → deploy to production. Automation line: manual production release versus full automation is a posture the pipeline definition makes explicit.

⚠️ Top pitfall: Assuming every organization automates all the way to production — regulated industries deliberately stop at the deploy gate and release by human approval, and the Jenkinsfile supports that with its manual intervention plugins.

Self-check: List the four benefits of a Jenkinsfile and the order of the end-to-end pipeline stages.

Connects to: Section 12.4, Section 12.6

Multi-Branch Pipelines

Must-know: Multi-branch pipeline: different Jenkinsfiles per branch of the same project; Jenkins automatically discovers branches that contain a Jenkinsfile (so every branch needs one); creation steps are name, branch source (e.g., Git), repository location, save; trigger interval can be periodic, remote, or on source change; branch name and change id variables make runs traceable to a branch and a pull request.

⚠️ Top pitfall: Pushing a branch without a Jenkinsfile — the multi-branch project skips it silently, so that branch never gets built or tested.

Self-check: What must every branch contain for the multi-branch feature to run, and which two environment variables identify a run?

Connects to: Section 12.5, Section 12.7

Artifact Management

Must-know: Artifact = output of any lifecycle step (spec, diagrams, jars, the app itself). Repository roles: central management, proxy to public sources, promotion record. Tools: JFrog Artifactory, Nexus, Maven, Helix Core. Checklist: secure, trusted, stable, accessible, version. Better than a folder: versioning/rollback, central dependency management, collaboration. Fixes works-on-my-laptop; build scripts point at the repository URL as single source of truth.

⚠️ Top pitfall: Pointing dependency downloads at local or internet sources instead of the artifact repository URL — that is how the works-on-my-laptop syndrome and dependency drift get started.

Self-check: Name the three roles of an artifact repository and the five items on the tool-choice checklist.

Connects to: Section 12.6, Section 12.8

Team Discussion: Git, Artifactory, and Real Practices

Must-know: Best practice keeps artifacts segregated from source code (even on one platform, separate the paths); Git and artifact repositories are different categories — Git manages source history with centralized and distributed working and a strong suggestion engine, Artifactory/Nexus manage artifacts, and Docker images in Artifactory make it an artifact repository, not a version control system; non-coders can complete all three labs (Git commands, cloned public code for Jenkins, script understanding for Selenium).

⚠️ Top pitfall: Treating the artifact repository and the version control system as the same kind of tool because both version things — they are different categories: Git manages source history; artifact tools manage binaries, libraries, and Docker images.

Self-check: Why does best practice segregate artifacts from source code, and when did the instructor accept keeping both on one platform?

Connects to: Section 12.7, Section 12.9

Bonus: Master–Slave Topology and What Comes Next

Must-know: Master–slave: one master coordinates, slaves execute (build, test), results return to the master, and the division makes CI/CD scale. Bonus point: replaces the three tasks with one task, scores the same marks, adds no extra points, skipping brings no deduction; the work is an architecture diagram of the master connected to all tools with artifact handling.

⚠️ Top pitfall: Reading 'bonus' as extra credit — the bonus point scores the same marks as the three tasks it replaces and adds nothing on top.

Self-check: What does the master do in the master–slave topology, and what does the bonus point require you to draw?

Connects to: Section 12.8

Exam Guidance Summary

Must-know: Deadline 6th of November; portal submission is mandatory for grading (document with name, problem number, drive location); labs are demo-based (video or screenshots); case studies are plagiarism-checked at a 30% threshold; pick one lab or both case studies; the bonus point is a same-score swap with no deduction if skipped.

⚠️ Top pitfall: Submitting only the video and skipping the portal document — grading cannot be completed without the portal submission.

Self-check: What must every video-based submission include on the portal, and what happens when case study plagiarism exceeds 30%?

Connects to: Section 12.1, Section 12.9

Key Industry Applications

Must-know: Jenkins + plugin ecosystem is the industry-standard CI server; pipeline-as-code via Jenkinsfile gives source-code benefits; JFrog Artifactory and Nexus dominate artifact storage; multi-branch pipelines are the microservice pattern; staging delivery versus production deployment is the standard two-environment flow.

Self-check: Which two tools dominate industry artifact storage, and how does the multi-branch pipeline pattern serve microservice development?

Connects to: Section 12.4, Section 12.7

Was this lecture useful?

Loading comments…
🤖

BitsNotes AI Assistant

Subject Notes Assistant

Configure AI Chat

Choose how to access the chatbot
Have your own API key?

Switch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.

🔑 Enter API key above to fetch live models from provider, or enter model name manually.
OpenAI-Compatible API Support

Choose any provider preset (Gemini, DeepSeek, Kimi, GLM, MiniMax, Qwen, OpenAI, Groq, Ollama, etc.) or enter a custom endpoint URL.

Security & Privacy First

Your API key is sent directly from your browser to your specified provider. BitsNotes servers never store or see your key.