Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

 

...

This guide will show you how to add Kiuwan as

...

an integrated step of the

...

 

 

 

...

pipeline process with CircleCI

Contents

Table of Contents

Step 1: Environment Variables

Go to Settings > Projects > Configuration > Environment Variables to create environment variables to establish your Kiuwan credentials:

Name: 

  • KIUWAN_USER
  • KIUWAN_PASSWD

Value: 

  • your preferred values

Image Added

Step 2: Add Kiuwan to config.yml

  1. Create a directory named .circleci in your GitHub repository. 
  2. Place a config file named config.yml with the following contents (download a sample config.yml file here).

Code Block
languagebash
titleconfig.yml
#
# Check https://circleci.com/docs/2.0/language-java/ for more details

...


#

...


version: 2

...


jobs:

...


 build:

...


    docker:

...


       # IMPORTANT : specify any image but allways use Java 1.8 !!
       - image: circleci/openjdk:8-jdk

...


 
    working_directory: ~/repo

...


    steps:

...


       - checkout

       # Download and install Kiuwan Local Analyzer
       - run: 
           name: Download and Install KLA
           command: |
               wget https://www.kiuwan.com/pub/analyzer/KiuwanLocalAnalyzer.zip -P ${HOME}

...


               unzip ${HOME}/KiuwanLocalAnalyzer.zip -d ${HOME}

...


               chmod +x ${HOME}/KiuwanLocalAnalyzer/bin/*.sh

...


 
       # Executes Kiuwan Local Analyzer 
       # Visit https://www.kiuwan.com/docs/display/K5/Code+analysis+using+the+downloaded+agent for a full description of command line options
       - run:
           name: Run Kiuwan baseline analysis
           command: ${HOME}/KiuwanLocalAnalyzer/bin/agent.sh -n ${CIRCLE_PROJECT_REPONAME} -s ${HOME}/repo -l "Circle CI ${CIRCLE_BUILD_NUM}" -c -wr --user ${KIUWAN_USER} --pass ${KIUWAN_PASSWD} exclude.patterns="./KiuwanLocalAnalyzer/**,**/*.min.js,**/*.Designer.vb,**/*Reference.vb,**/*Service.vb,**/*Silverlight.vb,**/*.designer.vb,**/*reference.vb,**/*service.vb,**/*silverlight.vb,**/*.Designer.cs,**/*Reference.cs,**/*Service.cs,**/*Silverlight.cs,**/*.designer.cs,**/*reference.cs,**/*service.cs,**/*silverlight.cs,**/.*,**/Pods/BuildHeaders/**/*.h,**/Pods/Headers/**/*.h include.patterns=**/**" ignore=architecture

 

 

 

...


Image Added

Kiuwan is now integrated into your Circle CI pipeline. 

Image Added