-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding cx-jenkins-lib and update README
- Loading branch information
Showing
9 changed files
with
547 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Created by https://www.gitignore.io/api/eclipse,windows | ||
# Edit at https://www.gitignore.io/?templates=eclipse,windows | ||
|
||
### Eclipse ### | ||
|
||
.metadata | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.settings/ | ||
.loadpath | ||
.recommenders | ||
|
||
# External tool builders | ||
.externalToolBuilders/ | ||
|
||
# Locally stored "Eclipse launch configurations" | ||
*.launch | ||
|
||
# PyDev specific (Python IDE for Eclipse) | ||
*.pydevproject | ||
|
||
# CDT-specific (C/C++ Development Tooling) | ||
.cproject | ||
|
||
# CDT- autotools | ||
.autotools | ||
|
||
# Groovy | ||
.groovy/ | ||
|
||
# Java annotation processor (APT) | ||
.factorypath | ||
|
||
# PDT-specific (PHP Development Tools) | ||
.buildpath | ||
|
||
# sbteclipse plugin | ||
.target | ||
|
||
# Tern plugin | ||
.tern-project | ||
|
||
# TeXlipse plugin | ||
.texlipse | ||
|
||
# STS (Spring Tool Suite) | ||
.springBeans | ||
|
||
# Code Recommenders | ||
.recommenders/ | ||
|
||
# Annotation Processing | ||
.apt_generated/ | ||
|
||
# Scala IDE specific (Scala & Java development for Eclipse) | ||
.cache-main | ||
.scala_dependencies | ||
.worksheet | ||
|
||
### Eclipse Patch ### | ||
# Eclipse Core | ||
.project | ||
|
||
# JDT-specific (Eclipse Java Development Tools) | ||
.classpath | ||
|
||
# Annotation Processing | ||
.apt_generated | ||
|
||
.sts4-cache/ | ||
|
||
### Windows ### | ||
# Windows thumbnail cache files | ||
Thumbs.db | ||
ehthumbs.db | ||
ehthumbs_vista.db | ||
|
||
# Dump file | ||
*.stackdump | ||
|
||
# Folder config file | ||
[Dd]esktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msix | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# End of https://www.gitignore.io/api/eclipse,windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
@Library('sast') | ||
|
||
import com.checkmarx.sast.jenkins.CxScan | ||
import com.checkmarx.sast.jenkins.LineOfBusiness | ||
import com.checkmarx.sast.jenkins.ProjectTypes | ||
|
||
pipeline { | ||
agent any | ||
stages { | ||
stage ('\u2776 ENV') { | ||
steps { | ||
script { | ||
log.info "\u2600 BUILD_URL=${env.BUILD_URL}" | ||
|
||
def workspace = pwd() | ||
log.info "\u2600 workspace=${workspace}" | ||
} | ||
} | ||
} | ||
|
||
stage ('\u2777 SCM') { | ||
steps { | ||
script { | ||
log.info 'Pulling source...' | ||
git 'https://github.com/randygeyer/dvna.git' | ||
} | ||
} | ||
} | ||
|
||
stage ('\u2778 SCAN') { | ||
steps { | ||
script { | ||
log.info 'Starting CxSAST scan...' | ||
def appTeam = 'GoRide' | ||
def appId = '12345' | ||
def appName = 'App1' | ||
def component = 'Component1' | ||
def branch = 'Dev' | ||
def environment = 'accept' | ||
def cx = new CxScan(this, LineOfBusiness.AppSec, ProjectTypes.WebApp, appTeam, appId, | ||
appName, component, branch, environment) | ||
cx.addFolderExclusions('mytest,libs') | ||
cx.addScanComment('testing 123...') | ||
cx.doFullScan() | ||
} | ||
} | ||
} | ||
|
||
stage ('\u2778 OSA SCAN') { | ||
steps { | ||
script { | ||
log.info 'Starting CxOSA scan...' | ||
def appTeam = 'GoRide' | ||
def appId = '12345' | ||
def appName = 'App1' | ||
def component = 'Component1' | ||
def branch = 'Dev' | ||
def environment = 'accept' | ||
def cx = new CxScan(this, LineOfBusiness.AppSec, ProjectTypes.WebApp, appTeam, appId, | ||
appName, component, branch, environment) | ||
|
||
def includeFolders = 'libs' | ||
def excludeFolders = '' | ||
cx.doOsaScan(includeFolders, excludeFolders) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# cx-jenkins-lib | ||
Jenkins Pipeline shared library example | ||
|
||
https://jenkins.io/doc/book/pipeline/shared-libraries/ | ||
|
||
Author: [email protected] | ||
|
Oops, something went wrong.