Blame view

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