Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Commit f2fe954

Browse files
author
Tobias Richter
authored
Merge pull request #61 from wcm-io-devops/feature/release-2.0.0
prepare release 2.0.0
2 parents b3c7b74 + 62ab49b commit f2fe954

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+24
-810
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ The pipeline library comes with the following steps:
113113
* [`lookupHttpCredential`](vars/credentials.md#lookuphttpcredentialstring-uri)
114114
* [`lookupScmCredential`](vars/credentials.md#lookupscmcredentialstring-uri)
115115
* [`lookupSshCredential`](vars/credentials.md#lookupsshcredentialstring-uri)
116-
* [`execManagedShellScript`](vars/execManagedShellScript.md)
117116
* [`execMaven`](vars/execMaven.md)
118117
* [`execMavenRelease`](vars/execMavenRelease.md)
119118
* [`execNpm`](vars/execNpm.md)
@@ -142,16 +141,11 @@ The pipeline library comes with the following steps:
142141
* [`notify.mattermost`](vars/notify.md#notifymattermostmap-config)
143142
* [`notify.mqtt`](vars/notify.md#notifymqttmap-config)
144143
* [`notify.teams`](vars/notify.md#notifyteamsmap-config)
145-
* [`notifyMail`](vars/notifyMail.md) :warning: deprecated, use
146-
[`notify.mail`](vars/notify.md#notifymailmap-config) instead
147144
* [`setBuildName`](vars/setBuildName.md)
148-
* [`setGitBranch`](vars/setGitBranch.md)
149145
* [`setScmUrl`](vars/setScmUrl.md)
150146
* [`setupTools`](vars/setupTools.md)
151147
* [`sshAgentWrapper`](vars/sshAgentWrapper.md)
152148
* [`transferScp`](vars/transferScp.md)
153-
* [wrap](vars/wrap.md)
154-
* [`wrap.color`](vars/wrap.md) :warning: deprecated, use [`wrappers`](vars/wrappers.md) instead.
155149
* [wrappers](vars/wrappers.md)
156150
* [`wrappers.color`](vars/wrappers.md#colormap-config-closure-body)
157151

assembly/complete.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<include>resources/**/*</include>
1414
<include>src/**/*</include>
1515
<include>vars/**/*</include>
16+
<include>test/**/*</include>
1617
<include>**/*.md</include>
1718
</includes>
1819
</fileSet>

docs/config-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Map config = [
6969
]
7070
7171
// initialize the logger
72-
Logger.init(steps, config)
72+
Logger.init(this, config)
7373
7474
node() {
7575
// setup the tools

docs/usage-examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Map config = [
2626
// surround by try and catch
2727
try {
2828
// initialize the logger
29-
Logger.init(steps, config)
29+
Logger.init(this, config)
3030
node() {
3131
// setup the tools
3232
setupTools(config)

jenkinsfiles/integration-tests.groovy

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,6 @@ node() {
202202
log.info(ManagedFileConstants.MAVEN_SETTING_ENV, ManagedFileConstants.MAVEN_SETTING_ENV)
203203
log.info(ManagedFileConstants.NPM_CONFIG_USERCONFIG_PATH, ManagedFileConstants.NPM_CONFIG_USERCONFIG_PATH)
204204
log.info(ManagedFileConstants.NPM_CONFIG_USERCONFIG_ENV, ManagedFileConstants.NPM_CONFIG_USERCONFIG_ENV)
205-
log.info(ManagedFileConstants.NPM_CONF_USERCONFIG_ENV, ManagedFileConstants.NPM_CONF_USERCONFIG_ENV)
206-
log.info(ManagedFileConstants.NPMRC_PATH, ManagedFileConstants.NPMRC_PATH)
207-
log.info(ManagedFileConstants.NPMRC_ENV, ManagedFileConstants.NPMRC_ENV)
208-
log.info(ManagedFileConstants.NPM_CONF_GLOBALCONFIG_ENV, ManagedFileConstants.NPM_CONF_GLOBALCONFIG_ENV)
209205
log.info(ManagedFileConstants.BUNDLE_CONFIG_ENV, ManagedFileConstants.BUNDLE_CONFIG_ENV)
210206
log.info(ManagedFileConstants.BUNDLE_CONFIG_PATH, ManagedFileConstants.BUNDLE_CONFIG_PATH)
211207

@@ -350,8 +346,6 @@ node() {
350346
mavenCommandBuilder.build()
351347
mavenCommandBuilder.reset()
352348

353-
mavenCommandBuilder = new MavenCommandBuilderImpl((DSL) this.steps, "mvn")
354-
355349
mavenCommandBuilder = new MavenCommandBuilderImpl((DSL) this.steps, [:])
356350
mavenCommandBuilder = new MavenCommandBuilderImpl((DSL) this.steps, [:], "mvn")
357351
}
@@ -426,9 +420,6 @@ node() {
426420
integrationTestUtils.runTest("Logger") {
427421
Logger test = new Logger(this)
428422
// call all logger init functions
429-
Logger.init((DSL) this.steps, [:])
430-
Logger.init((DSL) this.steps, "info")
431-
Logger.init((DSL) this.steps, 0)
432423
Logger.init(this, [:])
433424
Logger.init(this, "info")
434425
Logger.init(this, 0)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<groupId>io.wcm.devops.jenkins</groupId>
3131
<artifactId>io.wcm.devops.jenkins.pipeline-library</artifactId>
32-
<version>1.9.1-SNAPSHOT</version>
32+
<version>2.0.0-SNAPSHOT</version>
3333
<description>wcm.io Jenkins Pipeline Library</description>
3434

3535
<scm>

src/io/wcm/devops/jenkins/pipeline/managedfiles/ManagedFileConstants.groovy

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,7 @@ class ManagedFileConstants implements Serializable {
3535
static final String MAVEN_SETTING_ENV = "MVN_SETTINGS"
3636

3737
static final String NPM_CONFIG_USERCONFIG_PATH = "managedfiles/npm/npm-config-userconfig.json"
38-
// wrong named in existing jenkins/maven projects
39-
@Deprecated
4038
static final String NPM_CONFIG_USERCONFIG_ENV = "NPM_CONFIG_USERCONFIG"
41-
// correct name based on NPM config
42-
static final String NPM_CONF_USERCONFIG_ENV = "NPM_CONF_USERCONFIG"
43-
44-
static final String NPMRC_PATH = "managedfiles/npm/npmrc.json"
45-
// wrong name in existing jenkins/maven projects
46-
@Deprecated
47-
static final String NPMRC_ENV = "NPMRC"
48-
// correct name based on NPM config
49-
static final String NPM_CONF_GLOBALCONFIG_ENV = "NPM_CONF_GLOBALCONFIG"
50-
5139

5240
static final String BUNDLE_CONFIG_ENV = "BUNDLE_CONFIG"
5341
static final String BUNDLE_CONFIG_PATH = "managedfiles/ruby/bundle-config.json"

src/io/wcm/devops/jenkins/pipeline/shell/MavenCommandBuilderImpl.groovy

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,11 @@ class MavenCommandBuilderImpl implements Serializable, CommandBuilder, ConfigAwa
4949

5050
public Logger log = new Logger(this)
5151

52-
/**
53-
* @param dsl The DSL object of the current pipeline script (available via this.steps in pipeline scripts)
54-
* @param executable The executable, default: 'maven'
55-
*
56-
* @deprecated
57-
*/
58-
MavenCommandBuilderImpl(DSL dsl, String executable = null) {
59-
this(dsl, [:], executable)
60-
log.warn("Calling MavenCommandBuilderImpl Constructor without params is deprecated and is subject to remove in the upcoming versions")
61-
}
62-
6352
/**
6453
* @param dsl The DSL object of the current pipeline script (available via this.steps in pipeline scripts)
6554
* @param executable The executable, default: 'maven'
6655
*/
67-
MavenCommandBuilderImpl(DSL dsl, Map params, String executable = null) {
56+
MavenCommandBuilderImpl(DSL dsl, Map params = [:], String executable = null) {
6857
commandBuilder = new CommandBuilderImpl(dsl, executable ?: EXECUTABLE)
6958
this.dsl = dsl
7059
this._params = params

src/io/wcm/devops/jenkins/pipeline/utils/logging/Logger.groovy

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Logger implements Serializable {
8080
*
8181
* @param dsl The DSL object of the current pipeline script (available via this.steps in pipeline scripts)
8282
* @param logLvl The log level to use during execution of the pipeline script
83-
* @deprecated
83+
* @deprecated still used by tests
8484
*/
8585
@NonCPS
8686
static void init(DSL dsl, LogLevel logLvl = LogLevel.INFO) {
@@ -95,51 +95,6 @@ class Logger implements Serializable {
9595
tmpLogger.deprecated('Logger.init(DSL dsl, logLevel)','Logger.init(Script script, logLevel)')
9696
}
9797

98-
/**
99-
* Initializes the logger with DSL/steps object and configuration map
100-
*
101-
* @param dsl The DSL object of the current pipeline script (available via this.steps in pipeline scripts)
102-
* @param map The configuration object of the pipeline
103-
* @deprecated
104-
*/
105-
@NonCPS
106-
static void init(DSL dsl, Map map) {
107-
LogLevel lvl
108-
if (map) {
109-
lvl = map[ConfigConstants.LOGLEVEL] ?: LogLevel.INFO
110-
} else {
111-
lvl = LogLevel.INFO
112-
}
113-
init(dsl, lvl)
114-
}
115-
116-
/**
117-
* Initializes the logger with DSL/steps object and loglevel as string
118-
*
119-
* @param dsl The DSL object of the current pipeline script (available via this.steps in pipeline scripts)
120-
* @param sLevel the log level as string
121-
* @deprecated
122-
*/
123-
@NonCPS
124-
static void init(DSL dsl, String sLevel) {
125-
if (sLevel == null) sLevel = LogLevel.INFO
126-
init(dsl, LogLevel.fromString(sLevel))
127-
}
128-
129-
/**
130-
* Initializes the logger with DSL/steps object and loglevel as integer
131-
*
132-
* @param dsl The DSL object of the current pipeline script (available via this.steps in pipeline scripts)
133-
* @param iLevel the log level as integer
134-
*
135-
* @deprecated
136-
*/
137-
@NonCPS
138-
static void init(DSL dsl, Integer iLevel) {
139-
if (iLevel == null) iLevel = LogLevel.INFO.getLevel()
140-
init(dsl, LogLevel.fromInteger(iLevel))
141-
}
142-
14398
/**
14499
* Initializes the logger with CpsScript object and LogLevel
145100
*

src/jenkins-pipeline-library.gdsl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,9 @@ contributor(pipelineCtx) {
3030
method(name: 'execMaven', type: 'void', params: [config: Map], doc: 'Executes maven with the given configuration')
3131
method(name: 'execMavenRelease', type: 'void', params: [config: Map], doc: 'Performs a maven release with the given configuration')
3232
method(name: 'execNpm', type: 'void', params: [config: Map], doc: 'Executed NPM with the given configuration')
33-
method(name: 'getBuildParameters.groovy', type: String, doc: 'Returns the current build parameters')
3433
method(name: 'getScmUrl', type: String, doc: 'Returns the current scm url')
3534
method(name: 'getScmUrl', type: String, params: [config: Map], doc: 'Returns the current scm url')
36-
method(name: 'notifyMail', type: 'void', params: [config: Map], doc: 'Sends mail notification with the given configuration')
3735
method(name: 'setBuildName', type: 'void', doc: 'Sets the current build name to #BUILD_NUMBER GIT_BRANCH')
38-
method(name: 'setGitBranch', type: 'void', doc: 'Detects the current git branch and sets the result into GIT_BRANCH environment variable')
3936
method(name: 'setScmUrl', type: 'void', params: [config: Map], doc: 'Detects the current scm url and sets the result into SCM_URL environment variable')
4037
method(name: 'setupTools', type: 'void', params: [config: Map], doc: 'Setup tools configured in the provided configuration')
4138
method(name: 'sshAgentWrapper', type: 'void', params: [sshTarget: String, body: Closure], doc: 'Provides auto lookup for ssh credential and wraps body into an sshagent')
@@ -58,7 +55,6 @@ contributor(pipelineCtx) {
5855
def ansible = context(ctype: "ansible")
5956
contributor(ansible) {
6057
method(name: 'execPlaybook', type: 'void', params: [config: Map], doc: 'Executes a ansible playbook with the given configuration.')
61-
method(name: 'checkoutRequirements', type: 'void', params: [requirementsYmlPath: String], doc: 'Deprecated, use ansible.checkoutRoles instead.')
6258
method(name: 'checkoutRoles', type: 'void', params: [galaxyRoleFile: String], doc: 'Checks out ansible galaxy roles based upon a provided path to a requirements YAML file.')
6359
method(name: 'checkoutRoles', type: 'void', params: [config: Map], doc: 'Checks out ansible galaxy roles based upon a provided pipeline configuration.')
6460
method(name: 'getGalaxyRoleInfo', type: 'Object', params: [role: 'io.wcm.devops.jenkins.pipeline.tools.ansible.Role'], doc: 'Calls the ansible galaxy API for role information')
@@ -155,7 +151,7 @@ contributor(notify) {
155151
method(name: 'teams', type: 'void', params: [config: Map], doc: 'Triggers an MS Teams notification')
156152
}
157153

158-
def wrap = context(ctype: "wrap")
154+
def wrap = context(ctype: "wrappers")
159155
contributor(wrap) {
160156
method(name: 'color', type: 'void', params: [config: Map, closure: Closure], doc: 'Enables color output in Jenkins console by using the ansiColor step.')
161157
}

0 commit comments

Comments
 (0)