Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Customized image with docker and selected plugin pre-backed. This image makes use of docker secrets and runs in a swarm cluster

Notifications You must be signed in to change notification settings

shazChaudhry/docker-jenkins

Repository files navigation

Build Status on Travis

This image extends the latest version of Jenkins Continuous Integration and Delivery server. Additionally, it comes with the latest stable version of Docker engine and the following plugins are pre-installed:

Create local environment

  • Clone this repository: git clone https://github.com/shazChaudhry/docker-jenkins.git
  • Change directory: cd docker-jenkins
  • Run provided vagrantfile: vagrant up
  • ssh to the vagrant box: vagrant ssh
  • Change to synched folder: cd /vagrant

play-with-docker environment

  • Navigate to http://play-with-docker.com/ and create docker swarm environment
  • Clone this repository: git clone https://github.com/shazChaudhry/docker-jenkins.git && cd docker-jenkins

Instructions to run Jenkins

  1. Execute this step if building the image from source. Otherwise skip to step 2 Use the following command to build the image from source:
    docker image build --no-cache \
    --tag shazchaudhry/docker-jenkins:latest \
    --build-arg GIT_COMMIT=$(git log -1 --format=%H) .

    Run this command to confirm git commit:-
    docker image inspect shazchaudhry/docker-jenkins:latest | jq '.[].ContainerConfig.Labels'
  1. Use the following commands to run the image:
    echo "admin" | docker secret create jenkins-user -
    echo "admin" | docker secret create jenkins-pass -
    docker stack deploy --compose-file=docker-compose.yml jenkins
    docker stack services jenkins

Test

  • If provided vagrantfile is being used, in your favorite web browser, navigate to http://node1/jenkins
    • username = admin
    • password = admin

Visualization

  • docker stack deploy --compose-file=docker-compose.portainer.yml portainer Use Portainer agent setup to deploy inside a Swarm cluster
  • Portainer is available at http://node1:9000. Portainer documentation is here on github

Clean up:

  • vagrant destroy --force destroy all VMs that were created above

About

Customized image with docker and selected plugin pre-backed. This image makes use of docker secrets and runs in a swarm cluster

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published