From 33458c76d0e355476d273305a590c18b797f76d3 Mon Sep 17 00:00:00 2001 From: kreap Date: Thu, 25 Apr 2019 16:38:49 -0400 Subject: [PATCH 1/3] Initial Jenkins documentation added --- jenkins/README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 jenkins/README.md diff --git a/jenkins/README.md b/jenkins/README.md new file mode 100644 index 0000000..00d3f0d --- /dev/null +++ b/jenkins/README.md @@ -0,0 +1,42 @@ +# Jenkins Demo Pipeline Tutorial +##### From Nothing, to Pipeline in 15 minutes +This tutorial will show you how easy it can be to stand up your own pipeline in Jenkins. +Looking to install Jenkins on OCP and Build a pipeline? Start at Step 1. +Looking to just stand up a new pipeline? Start on Step 2 +### Pre-Reqs + - Pre-dev Environment Only (TODO: Parameterize Links for Flexability) + - Gitlab Jenkins user w/ ssh keys + +### 1. Installation in OCP +#### WIP + +### 2. Creating your own Pipeline + +1. Install Plugins (Ignore if you did not do step 1.) +``` +From Jenkins Dashboard go to Manage Jenkins > Manage Plugins > Available +Install the following plugins: +Anchore Container Scanner +SSH Steps +``` +2. Create Openscap Credentials (Ignore if you did not do step 1.): +``` +From Jenkins Dashboard go to Credentials > System > Global Credentials > Add Credentials > SSH Username with Private Key +Select the Private Key checkbox and enter the private key for your pre-req made jenkins user from gitlab +Enter username and hit Create +``` +3. Configure Anchore (Ignore if you did not do step 1.): +``` +From Jenkins Dashboard go to Manage Jenkins > Configure Jenkins > Scroll to Anchore Plugin Config +Enter our anchore url and user/password (Anchore url used for Demo: http://up-anchore-engine-api.anchore.svc:8228/v1) +``` +4. Create Jenkins Pipeline +``` +From Jenkins Dashboard go to: New Item > New Pipeline (Give it a name) +On the screen for configuration select the 'this build is parameterized' checkbox +Select Add Parameter > String Parameter +Enter IMAGE_TAG for name, and a default value (Demo used: up/ubi7-hardened-dev:latest) +Scroll down to bottom of configuration, and click under Pipeline: Definition: Pipeline from SCM +Enter Repository url and gitlab user (Demo used: git@ec2-52-61-29-205.us-gov-west-1.compute.amazonaws.com:unified-platform/tool-configs.git) +Type Branch name (Demo used: master) +Click Ok to generate the pipeline -- GitLab From ad292da6cef270648a75701c2c55e3f2f1a5a815 Mon Sep 17 00:00:00 2001 From: Terrence Cort Date: Fri, 26 Apr 2019 12:14:08 -0400 Subject: [PATCH 2/3] Added plugins to the list for setup --- jenkins/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jenkins/README.md b/jenkins/README.md index 00d3f0d..7842de1 100644 --- a/jenkins/README.md +++ b/jenkins/README.md @@ -17,7 +17,10 @@ Looking to just stand up a new pipeline? Start on Step 2 From Jenkins Dashboard go to Manage Jenkins > Manage Plugins > Available Install the following plugins: Anchore Container Scanner -SSH Steps +SSH Pipeline Steps +SSH Plugin +SSH Credentials + ``` 2. Create Openscap Credentials (Ignore if you did not do step 1.): ``` -- GitLab From 8f5960d60241b649544f6287846e655b43101d14 Mon Sep 17 00:00:00 2001 From: Terrence Cort Date: Fri, 26 Apr 2019 12:15:24 -0400 Subject: [PATCH 3/3] added credentials --- jenkins/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jenkins/README.md b/jenkins/README.md index 7842de1..cead27e 100644 --- a/jenkins/README.md +++ b/jenkins/README.md @@ -16,10 +16,10 @@ Looking to just stand up a new pipeline? Start on Step 2 ``` From Jenkins Dashboard go to Manage Jenkins > Manage Plugins > Available Install the following plugins: -Anchore Container Scanner -SSH Pipeline Steps -SSH Plugin -SSH Credentials + - Anchore Container Scanner + - SSH Pipeline Steps + - SSH Plugin + - SSH Credentials ``` 2. Create Openscap Credentials (Ignore if you did not do step 1.): -- GitLab