From e405134ce41dd758aaaa15d5d1b6ef5ab19a8439 Mon Sep 17 00:00:00 2001 From: Aysh2301 <50611572+Aysh2301@users.noreply.github.com> Date: Wed, 9 Sep 2020 12:16:01 +0800 Subject: [PATCH] Create sample --- sample | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sample diff --git a/sample b/sample new file mode 100644 index 00000000..7aa4e2ec --- /dev/null +++ b/sample @@ -0,0 +1,23 @@ +node "master" { + stage ('BranchCheckOut') { + checkout([$class: 'GitSCM', branches: [[name: "master"]],userRemoteConfigs: [[credentialsId: 'credentials', url: 'https://github.com/OpenKMIP/PyKMIP.git']]]) + } + + stage ('Sonarqube'){ + sh """ + cd ${env.workspace} + sonar-scanner + """ + } + } + + stage ('Docker image') { + docker.image('ubuntu:latest').pull() + docker.image("ubuntu:latest").inside("-u root:root -v ${env.WORKSPACE}:/checkoutfolder -p 80:8080 -p 443:4043 -v /mnt:/tmp -e MASTER_KEY=1 -e HOST_KEY=1") + { + apt-get install python3-dev libffi-dev libssl-dev libsqlite3-dev + cd /checkoutfolder + python pykmip/setup.py install + } + } +}