Skip to content

Commit

Permalink
Merge pull request #78 from cyberark/include-e2e-test-in-build
Browse files Browse the repository at this point in the history
Include e2e test in build
  • Loading branch information
sgnn7 authored Jun 16, 2020
2 parents 886f10c + 54f04e8 commit b714eb3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
14 changes: 11 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pipeline {
}
}
}

// workaround for Jenkins not fetching tags
stage('Fetch tags') {
steps {
Expand All @@ -44,15 +44,23 @@ pipeline {

stage('Run smoke tests') {
parallel {
stage('Test with Conjur v5') {
stage('Local agent - Conjur v5') {
steps {
dir('examples') {
sh './smoketest.sh'
}
}
}

stage('Test with Conjur Enterprise v4') {
stage('E2E - Conjur 5') {
steps {
dir('examples/puppetmaster') {
sh './smoketest_e2e.sh'
}
}
}

stage('Local agent - Conjur v4 EE') {
steps {
dir('examples/ee') {
sh './smoketest.sh'
Expand Down
7 changes: 3 additions & 4 deletions examples/puppetmaster/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ version: "3"

services:
puppet:
container_name: puppet
hostname: puppet
image: puppet/puppetserver:5.3.7
ports:
Expand All @@ -19,9 +18,11 @@ services:
depends_on:
- puppetdbpostgres
- puppetdb
links:
- "puppetdbpostgres:postgres"

puppetdbpostgres:
container_name: postgres
hostname: postgres
image: puppet/puppetdb-postgres
environment:
- POSTGRES_PASSWORD=puppetdb
Expand All @@ -31,7 +32,6 @@ services:
- 5432

puppetdb:
container_name: puppetdb
hostname: puppetdb
image: puppet/puppetdb
ports:
Expand All @@ -44,7 +44,6 @@ services:
- 8081:8000

puppetexplorer:
container_name: puppetexplorer
image: puppet/puppetexplorer
ports:
- 8080:80
Expand Down
8 changes: 1 addition & 7 deletions examples/puppetmaster/smoketest_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ set -euo pipefail

# Launches a full Puppet stack and converges a node against it

COMPOSE_PROJECT_NAME=puppetmaster

# make sure on Jenkins if something goes wrong the
# build doesn't fail because of leftovers from previous tries
if [ -n "${BUILD_NUMBER:-}" ]; then
COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME-$BUILD_NUMBER
fi
COMPOSE_PROJECT_NAME=puppetmaster_$(openssl rand -hex 3)

export COMPOSE_PROJECT_NAME
NETNAME=${COMPOSE_PROJECT_NAME//-/}_default
Expand Down

0 comments on commit b714eb3

Please sign in to comment.