Commit 6ba54cfeda21d67a09043aac8f1aa83d35097a00

Authored by George Vlahavas
1 parent 37fc56ce4b

Add anchore tests

Showing 1 changed file with 48 additions and 0 deletions

anchore.groovy View file @ 6ba54cf
  1 +/**
  2 +* Jenkinsfile to deploy multiple Docker containers based on docker-compose into a DEV server and run any test.
  3 +* This pipeline will run the Docker containers, execute the tests and then stop and remove the containers from the DEV
  4 +* server automatically.
  5 +**/
  6 +
  7 +
  8 +pipeline {
  9 +
  10 + agent {
  11 + node {
  12 + label 'agent-VM4'
  13 + }
  14 + }
  15 +
  16 + environment {
  17 +
  18 + // Keep as is the following two lines
  19 + PRIVATE_REGISTRY = "https://registry.curex-project.eu:443/curex-local/"
  20 + ARTIFACTORY_URL = "registry.curex-project.eu:443/curex-local/"
  21 +
  22 + HOST_IP = "116.203.166.220"
  23 + DEPLOYMENT_HOST = "${HOST_IP}:2376"
  24 + DEPLOYMENT_HOST_CREDENTIALS = "vm2-creds"
  25 + }
  26 +
  27 + stages {
  28 +
  29 + stage('Anchore Analysis') {
  30 + steps {
  31 + sh 'rm anchore_images'
  32 + sh 'echo "registry.curex-project.eu:443/curex-local/kea_suricata:latest" >> anchore_images'
  33 + sh 'echo "registry.curex-project.eu:443/curex-local/kea_elasticsearch:latest" >> anchore_images'
  34 + sh 'echo "registry.curex-project.eu:443/curex-local/kea_logstash:latest" >> anchore_images'
  35 + sh 'echo "registry.curex-project.eu:443/curex-local/kea_kibana:latest" >> anchore_images'
  36 + sh 'echo "registry.curex-project.eu:443/curex-local/kea_webserver:latest" >> anchore_images'
  37 + sh 'echo "registry.curex-project.eu:443/curex-local/kea_api:latest" >> anchore_images'
  38 + sh 'echo "registry.curex-project.eu:443/curex-local/kea_od:latest" >> anchore_images'
  39 + sh 'echo "registry.curex-project.eu:443/curex-local/kea_mltd:latest" >> anchore_images'
  40 + sh 'echo "registry.curex-project.eu:443/curex-local/kea_mqtt:latest" >> anchore_images'
  41 + sh 'echo "registry.curex-project.eu:443/curex-local/kea_timescaledb:latest" >> anchore_images'
  42 + sh 'echo "registry.curex-project.eu:443/curex-local/kea_grafana:latest" >> anchore_images'
  43 + anchore name: 'anchore_images', bailOnFail: true, annotations: [[key: 'AUTH', value: 'by Jenkins']], engineRetries: '6000', policyBundleId: '2c53a13c-1765-11e8-82ef-23527761d060'
  44 + }
  45 + }
  46 + }
  47 +}