Public Repository

Last pushed: a month ago
Short Description
Demonstration of Jenkins 2.0 “Pipeline-as-Code” using GitHub.
Full Description

Demo of GitHub Organization, multibranch projects, and pull requests.

To run the demo:

  1. Start the image: WORKSPACE=/tmp/demows docker run --rm -p 8080:8080 -p 4040:4040 -v /var/run/docker.sock:/var/run/docker.sock -v $WORKSPACE:$WORKSPACE -e WORKSPACE=$WORKSPACE -ti jenkinsci/pipeline-as-code-github-demo
  2. Visit localhost:8080.
  3. Prepare your environment in GitHub:
    1. Create an organization or user account (or use an existing one)
    2. Fork multibranch-demo to your own account or organization
  4. Log in with the random administrative password printed to the Docker log. Skip the rest of the setup wizard (close the dialog).
  5. Go to Credentials » GitHub and add a username/password pair using an access token generated here:
    1. Configure a personal access token with these scopes: repo:status and public_repo
  6. Create a new item, selecting GitHub Organization as the type, and setting the name to your account or organization name (for example, cloudbeers).
  7. Select your credentials token under Scan Credentials
  8. Optionally set the repository pattern to multibranch.*
  9. Save; you will see repositories being scanned.
  10. Go back to the organization index page. You should see multibranch-demo, under that one or more branches including master, and under each a successful build #1
  11. Add a new webhook, ask to Send me everything, and specify a URL like (look at the Docker log for the specific hostname). Remember to clean up your webhook when the demo is done
  12. File pull requests and see them being built (only if your repository is private)

The image needs to run Docker commands, so it assumes that your Docker daemon is listening to /var/run/docker.sock (discussion). This is not “Docker-in-Docker”; the container only runs the CLI and connects back to the host to start sister containers. The run target also makes reference to file paths on the Docker host, assuming they are where you are running that command, so this target cannot work on boot2docker. There may be some way to run this demo using boot2docker; if so, please contribute it.

Docker Pull Command

Comments (3)
2 months ago

For windows users , install

then use docker quick start terminal , to run this demo

4 months ago

How would you run this repository on Windows?

5 months ago

Using oh-my-zsh on a Mac, the command in step 1 did not work for me unless I broke up the environment variable and the docker command. That is,

WORKSPACE=/tmp/demows; docker run --rm -p 8080:8080 -p 4040:4040 -v /var/run/docker.sock:/var/run/docker.sock -v $WORKSPACE:$WORKSPACE -e WORKSPACE=$WORKSPACE -ti jenkinsci/pipeline-as-code-github-demo