Skip to content

Commit

Permalink
pipeline cleanup, simplified ?:, added license headers
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Jun 1, 2022
1 parent 1df785d commit 7f873fb
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 27 deletions.
15 changes: 6 additions & 9 deletions tools/jenkins/midpoint-main-generic-pg-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
* and European Union Public License. See LICENSE file for details.
*/

def verbose = 0
try {
verbose = Integer.parseInt(params.VERBOSE ?: '0')
} catch (Exception e) { /* ignored */ }
def verbose = params.VERBOSE ?: '0'

podTemplate(
activeDeadlineSeconds: 21600, // 6h total build limit
Expand All @@ -24,7 +21,7 @@ podTemplate(
resourceRequestMemory: '1Gi',
resourceLimitMemory: '1Gi'),
containerTemplate(name: 'postgres',
image: "${params.POSTGRES_IMAGE ?: 'postgres:14-alpine'}",
image: params.POSTGRES_IMAGE ?: 'postgres:14-alpine',
runAsUser: '0',
ttyEnabled: true,
resourceRequestCpu: '2',
Expand All @@ -38,19 +35,19 @@ podTemplate(
],
),
containerTemplate(name: 'maven',
image: "${params.BUILDER_IMAGE ?: 'maven:3.8.5-openjdk-17'}",
image: params.BUILDER_IMAGE ?: 'maven:3.8.5-openjdk-17',
runAsUser: '0',
ttyEnabled: true,
command: 'cat',
resourceRequestCpu: "${params.BUILDER_CPU ?: '4'}",
resourceLimitCpu: "${params.BUILDER_CPU ?: '4'}",
resourceRequestCpu: params.BUILDER_CPU ?: '4',
resourceLimitCpu: params.BUILDER_CPU ?: '4',
resourceRequestMemory: '8Gi',
resourceLimitMemory: '8Gi') // see also -Xmx flag lower
]
) {
node(POD_LABEL) {
stage("checkout") {
git branch: "${params.BRANCH ?: 'support-4.4'}",
git branch: params.BRANCH ?: 'support-4.4',
url: 'https://github.com/Evolveum/midpoint.git'
}
stage("db-init") {
Expand Down
7 changes: 2 additions & 5 deletions tools/jenkins/midpoint-main-generic-sql-server-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
*/

// Our MS SQL Server docs: https://docs.evolveum.com/midpoint/reference/repository/generic/ms-sql/
def verbose = 0
try {
verbose = Integer.parseInt(params.VERBOSE ?: '0')
} catch (Exception e) { /* ignored */ }
def verbose = params.VERBOSE ?: '0'

// ; needs to be escaped with \ for bash below (that is \\ in Groovy string)
def dbprops = '-Dmidpoint.repository.jdbcUrl=jdbc:sqlserver://localhost:1433\\;database=midtest\\;trustServerCertificate=true' +
Expand Down Expand Up @@ -57,7 +54,7 @@ podTemplate(
) {
node(POD_LABEL) {
stage("checkout") {
git branch: "${params.BRANCH ?: 'support-4.4'}",
git branch: params.BRANCH ?: 'support-4.4',
url: 'https://github.com/Evolveum/midpoint.git'
}
stage("db-init") {
Expand Down
18 changes: 11 additions & 7 deletions tools/jenkins/midpoint-main-nativepg-pipeline
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
def verbose = 0
try {
verbose = Integer.parseInt(params.VERBOSE ?: '0')
} catch (Exception e) { /* ignored */ }
/*
* Copyright (C) 2010-2022 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

def verbose = params.VERBOSE ?: '0'

podTemplate(
activeDeadlineSeconds: 21600, // 6h total build limit
Expand All @@ -17,7 +21,7 @@ podTemplate(
resourceRequestMemory: '1Gi',
resourceLimitMemory: '1Gi'),
containerTemplate(name: 'postgres',
image: "${params.POSTGRES_IMAGE ?: 'postgres:13-alpine'}",
image: params.POSTGRES_IMAGE ?: 'postgres:13-alpine',
runAsUser: '0',
ttyEnabled: true,
resourceRequestCpu: '2',
Expand All @@ -32,7 +36,7 @@ podTemplate(
],
ports: [portMapping(name: 'postgres', containerPort: 5432)]),
containerTemplate(name: 'maven',
image: "${params.BUILDER_IMAGE ?: 'maven:3.8.5-openjdk-11'}",
image: params.BUILDER_IMAGE ?: 'maven:3.8.5-openjdk-11',
runAsUser: '0',
ttyEnabled: true,
command: 'cat',
Expand All @@ -44,7 +48,7 @@ podTemplate(
) {
node(POD_LABEL) {
stage("checkout") {
git branch: "${params.BRANCH ?: 'support-4.4'}",
git branch: params.BRANCH ?: 'support-4.4',
url: 'https://github.com/Evolveum/midpoint.git'
}
stage("db-init") {
Expand Down
16 changes: 10 additions & 6 deletions tools/jenkins/midpoint-main-pipeline
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
def verbose = 0
try {
verbose = Integer.parseInt(params.VERBOSE ?: '0')
} catch (Exception e) { /* ignored */ }
/*
* Copyright (C) 2010-2022 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

def verbose = params.VERBOSE ?: '0'

podTemplate(
activeDeadlineSeconds: 21600, // 6h total build limit
Expand All @@ -18,7 +22,7 @@ podTemplate(
resourceRequestMemory: '1Gi',
resourceLimitMemory: '1Gi'),
containerTemplate(name: 'maven',
image: "${params.BUILDER_IMAGE ?: 'maven:3.8.5-openjdk-11'}",
image: params.BUILDER_IMAGE ?: 'maven:3.8.5-openjdk-11',
runAsUser: '0',
ttyEnabled: true,
command: 'cat',
Expand All @@ -30,7 +34,7 @@ podTemplate(
) {
node(POD_LABEL) {
stage("checkout") {
git branch: "${params.BRANCH ?: 'support-4.4'}",
git branch: params.BRANCH ?: 'support-4.4',
url: 'https://github.com/Evolveum/midpoint.git'
}
stage("build") {
Expand Down

0 comments on commit 7f873fb

Please sign in to comment.