Skip to content

Commit

Permalink
Update Jenkinsfile_jiro
Browse files Browse the repository at this point in the history
  • Loading branch information
thjaeckle committed Feb 3, 2023
1 parent 8fab338 commit dc448a4
Showing 1 changed file with 0 additions and 253 deletions.
253 changes: 0 additions & 253 deletions jenkins/Jenkinsfile_jiro
Original file line number Diff line number Diff line change
Expand Up @@ -66,258 +66,6 @@ spec:
stage('Clean workspace and create local maven repo') {
steps {
cleanWs()
// sh '''
// echo Create local maven repo
// mkdir -p $M2_REPO
// '''
}
}
stage('Checkout scm') {
steps {
checkout scm
}
}
stage('Test-Docker') {
agent {
docker {
image 'maven:3.8-openjdk-17'
}
}
steps {
sh "mvn --version"
}
}
stage('Compile') {
agent {
docker {
label "$NODE_LABEL"
args "-v $M2_REPO:/root/.m2:z $EXTRA_DOCKER_ARGS "
image 'maven:3.8-openjdk-17'
registryUrl "https://$DOCKER_REGISTRY/"
reuseNode true
}
}
steps{
sh "mvn clean test-compile --batch-mode --errors --update-snapshots -Drevision=$DITTO_VERSION -DforkCount=$FORK_COUNT ${EXTRA_MAVEN_ARGS ?: ''}"
}
}
stage('Preparation') {
steps{
script {
sh '''
echo environments for docker-compose
echo COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME
echo DOCKER_REGISTRY=$DOCKER_REGISTRY
echo DITTO_VERSION=$DITTO_VERSION
echo DOCKER_NETWORK=$DOCKER_NETWORK
'''
}
sh '''
echo delete compose override to avoid port binding
rm docker/docker-compose.override.yml
sudo chown root:root -R docker/sshd/config/custom-cont-init.d
'''
}
}
stage('Run module: system') {
stages {
stage('Start docker environment') {
steps {
sh '''
cd docker
TAG=system ./start.sh
'''
}
}
stage('Run tests') {
agent {
docker {
label "$NODE_LABEL"
args "-v $M2_REPO:/root/.m2:z " +
'--network=$DOCKER_NETWORK ' +
'--network-alias system-test-container ' +
// Port for Http-push mock-server
'--expose $HTTP_PUSH_MOCK_SERVER_PORT ' +
// Port for Amqp10Hub mock-servers
'--expose 5887 ' +
'--expose 5888 ' +
"$EXTRA_DOCKER_ARGS"
image 'maven:3.8-openjdk-17'
registryUrl "https://$DOCKER_REGISTRY/"
reuseNode true
}
}
environment {
MAVEN_OPTS="-Xmx1400M"
}
steps {
sh """
mvn verify -am -amd --batch-mode --errors --update-snapshots \
--projects=:system \
-Dtest.environment=docker-compose \
-Drevision=$DITTO_VERSION \
-DforkCount=$FORK_COUNT -DreuseForks=false \
${EXTRA_MAVEN_ARGS ?: ''}
"""
}
post {
always {
junit 'system*/target/failsafe-reports/**/*.xml'
}
}
}
}
post {
always {
sh '''
docker ps
cd docker
./stop.sh
'''
}
}
}
stage('Run module: sync-completely-enabled') {
environment {
EVENT_PROCESSING_ACTIVE = true
BACKGROUND_SYNC_ENABLED = true
BACKGROUND_SYNC_QUIET_PERIOD = '1s'
BACKGROUND_SYNC_TOLERANCE_WINDOW = '1ms'
THINGS_SEARCH_UPDATER_STREAM_WRITE_INTERVAL = '1s'
THINGS_SEARCH_UPDATER_STREAM_POLICY_CACHE_RETRY_DELAY= '1s'
THINGS_SEARCH_UPDATER_STREAM_THING_CACHE_RETRY_DELAY= '1s'
}
stages {
stage('Start docker environment') {
steps {
sh '''
cd docker
TAG=sync-completely-enabled ./start.sh
'''
}
}
stage('Run tests') {
agent {
docker {
label "$NODE_LABEL"
args "-v $M2_REPO:/root/.m2:z --network=$DOCKER_NETWORK $EXTRA_DOCKER_ARGS "
image 'maven:3.8-openjdk-17'
registryUrl "https://$DOCKER_REGISTRY/"
reuseNode true
}
}
environment {
MAVEN_OPTS="-Xmx1400M"
}
steps {
sh """
mvn verify -am -amd --batch-mode --errors --update-snapshots \
--projects=:sync-completely-enabled \
-Dtest.environment=docker-compose \
-Drevision=$DITTO_VERSION \
${EXTRA_MAVEN_ARGS ?: ''}
"""
}
post {
always {
junit 'system-sync/sync-completely-enabled/target/failsafe-reports/**/*.xml'
}
}
}
}
post {
always {
sh '''
cd docker
./stop.sh
'''
}
}
}
stage('Run module: sync-event-processing-enabled') {
environment {
EVENT_PROCESSING_ACTIVE = true
BACKGROUND_SYNC_ENABLED = false
THINGS_SEARCH_UPDATER_STREAM_WRITE_INTERVAL = '1s'
THINGS_SEARCH_UPDATER_STREAM_POLICY_CACHE_RETRY_DELAY= '1s'
THINGS_SEARCH_UPDATER_STREAM_THING_CACHE_RETRY_DELAY= '1s'
}
stages {
stage('Start docker environment') {
steps {
sh '''
cd docker
TAG=sync-event-processing-enabled ./start.sh
'''
}
}
stage('Run tests') {
agent {
docker {
label "$NODE_LABEL"
args "-v $M2_REPO:/root/.m2:z --network=$DOCKER_NETWORK $EXTRA_DOCKER_ARGS "
image 'maven:3.8-openjdk-17'
registryUrl "https://$DOCKER_REGISTRY/"
reuseNode true
}
}
environment {
MAVEN_OPTS="-Xmx1400M"
}
steps {
sh """
mvn verify -am -amd --batch-mode --errors --update-snapshots \
--projects=:sync-event-processing-enabled \
-Dtest.environment=docker-compose \
-Drevision=$DITTO_VERSION \
${EXTRA_MAVEN_ARGS ?: ''}
"""
}
post {
always {
junit 'system-sync/sync-event-processing-enabled/target/failsafe-reports/**/*.xml'
}
}
}
}
post {
always {
sh '''
cd docker
./stop.sh
'''
}
}
}
stage('Run module: sync-tags-streaming-enabled') {
environment {
EVENT_PROCESSING_ACTIVE = false
BACKGROUND_SYNC_ENABLED = true
BACKGROUND_SYNC_QUIET_PERIOD = '1s'
BACKGROUND_SYNC_TOLERANCE_WINDOW = '1ms'
THINGS_SEARCH_UPDATER_STREAM_WRITE_INTERVAL = '1s'
THINGS_SEARCH_UPDATER_STREAM_POLICY_CACHE_RETRY_DELAY= '1s'
THINGS_SEARCH_UPDATER_STREAM_THING_CACHE_RETRY_DELAY= '1s'
}
stages {
stage('Start docker environment') {
steps {
sh '''
cd docker
TAG=sync-tags-streaming-enabled ./start.sh
'''
}
}
stage('Run tests') {
agent {
docker {
label "$NODE_LABEL"
args "-v $M2_REPO:/root/.m2:z --network=$DOCKER_NETWORK $EXTRA_DOCKER_ARGS "
image 'maven:3.8-openjdk-17'
registryUrl "https://$DOCKER_REGISTRY/"
stage('Clean workspace and create local maven repo') {
steps {
cleanWs()
sh '''
echo Create local maven repo
mkdir -p $M2_REPO
Expand Down Expand Up @@ -419,4 +167,3 @@ stage('Clean workspace and create local maven repo') {
}
}
}
}

0 comments on commit dc448a4

Please sign in to comment.