GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mmshin/jenkins-pipeline: Jenkins Pipeline for CI/CD

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
images
images
 
 
Jenkinsfile
Jenkinsfile
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 

Repository files navigation

Jenkins Pipeline for CI/CD

Prerequisites

  • Jenkins
  • docker
  • docker-compose

Getting Started

  • Download and install Jenkins.
  • In Jenkins, make sure to install docker and docker-compose.

Jenkins Pipeline

  • From the Jenkin's Dashboard, select New Item.

    • Enter an Item Name and select Pipeline
    • Select OK

    New Item

  • Click on the Pipeline Tab

    • Definition: Pipeline script from SCM
    • SCM: Git
    • Repositories: Input the repository URL and credentials [select None if it's a public repository]
    • Branches to build: For this example, I used */master. You can also create a parameterized project.
    • Script Path: Jenkinsfile
  • Click SAVE.

    Pipeline SCM

Jenkins Pipeline Stage View

  • Cleanup Workspace
    • Cleanup workspace before building the project.
    • Delete exited containers.
  • Checkout
    • Checkout the branch to build
  • Build
  • Unit Test
  • Deploy
    • Wait for the approver's signal before executing this stage. Otherwise, abort pipeline.

Stage View

Jenkins Pipeline Approval Stage

Approval

docker-compose.yml

Do not forget to update MYSQL's root password.

...
  service-stock-mysql:
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: <YOUR_DB_PASSWORD>
...

Adjust the number of replica accordingly.

...
  php:
    image: custom-php:latest
    deploy:
      replicas: 2
    volumes:
      - ./:/var/www/
...

About

Jenkins Pipeline for CI/CD

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.