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

Commit

Permalink
Refactored package structure, changed artifact id for release prepara…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
Tobias Richter committed Dec 1, 2017
1 parent c63869c commit c2aefba
Show file tree
Hide file tree
Showing 157 changed files with 585 additions and 467 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Want to see an example? Have look at
* [Setup your environment to use the pipeline library](#setup-your-environment-to-use-the-pipeline-library)
* [Building/Testing](#buildingtesting)
* [Building with maven](#building-with-maven)
* [Changes / Version History](#changes--version-history)

## Key concepts

Expand Down Expand Up @@ -62,7 +63,7 @@ Configured properly this library enables you to checkout scm
with these lines of code:

```groovy
import static io.wcm.tooling.jenkins.pipeline.utils.ConfigConstants.*
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
checkoutScm( (SCM) : [
(SCM_URL) : "[email protected]/group/project.git",
]
Expand All @@ -73,7 +74,7 @@ Or running maven with local and global maven settings with these lines
of code:

```groovy
import static io.wcm.tooling.jenkins.pipeline.utils.ConfigConstants.*
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
execMaven(
(SCM) : [
(SCM_URL) : "[email protected]/group/project.git",
Expand Down Expand Up @@ -166,3 +167,11 @@ with jUnit/Failsafe. All integration tests have the naming format
### Building with maven

mvn clean install

## Changes / Version History

:bulb: Please also have a look at the [changes.xml](changes.xml)

### Version 1.0.0

* Initial Release
33 changes: 33 additions & 0 deletions changes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
wcm.io
%%
Copyright (C) 2015 wcm.io
%%
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#L%
-->

<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/changes/1.0.0"
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
<body>

<release version="1.0.0" date="not released">
<action type="add" dev="trichter">
Initial release.
</action>
</release>

</body>
</document>
16 changes: 8 additions & 8 deletions docs/config-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You may be wondering why each step gets named config map passed like

```groovy
import static io.wcm.tooling.jenkins.pipeline.utils.ConfigConstants.*
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
checkoutScm(
(SCM): [
Expand All @@ -15,7 +15,7 @@ checkoutScm(
or

```groovy
import static io.wcm.tooling.jenkins.pipeline.utils.ConfigConstants.*
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
execMaven(
(MAVEN): [
Expand All @@ -27,7 +27,7 @@ execMaven(
or

```groovy
import static io.wcm.tooling.jenkins.pipeline.utils.ConfigConstants.*
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
setupTools([
(TOOLS): [
Expand All @@ -45,11 +45,11 @@ With this structure you are able to keep your configuration in one place.
Based on the steps above you are able to create a pipeline job like this:

```groovy
import static io.wcm.tooling.jenkins.pipeline.utils.ConfigConstants.*
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
import io.wcm.tooling.jenkins.pipeline.model.Tool
import io.wcm.tooling.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.tooling.jenkins.pipeline.utils.logging.Logger
import io.wcm.devops.jenkins.pipeline.model.Tool
import io.wcm.devops.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.devops.jenkins.pipeline.utils.logging.Logger
Map config = [
(SCM): [
Expand Down Expand Up @@ -83,4 +83,4 @@ So your pipeline will stay much cleaner by keeping configuration in one place
## :+1: Tipp

All configuration option have constants. It is strongly recommended to
use them!
use them!
26 changes: 13 additions & 13 deletions docs/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ beginning of your pipeline script:

```groovy
// do the import
import io.wcm.tooling.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.tooling.jenkins.pipeline.utils.logging.Logger
import io.wcm.devops.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.devops.jenkins.pipeline.utils.logging.Logger
// initialize the logger with WorkflowScript reference (this
Logger.init(this, [ logLevel: [LogLevel.INFO] ])
Expand Down Expand Up @@ -83,8 +83,8 @@ initialize the `Logger` or set the `LogLevel` to `NONE`

```groovy
// do the import
import io.wcm.tooling.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.tooling.jenkins.pipeline.utils.logging.Logger
import io.wcm.devops.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.devops.jenkins.pipeline.utils.logging.Logger
// initialize the logger
Logger.init(this, [ logLevel: [LogLevel.TRACE] ])
Expand All @@ -102,9 +102,9 @@ Output:

```groovy
// do the import
import io.wcm.tooling.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.tooling.jenkins.pipeline.utils.logging.Logger
import static io.wcm.tooling.jenkins.pipeline.utils.ConfigConstants.*
import io.wcm.devops.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.devops.jenkins.pipeline.utils.logging.Logger
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
// initialize the logger
Logger.init(this, [ (LOGLEVEL) : LogLevel.WARN] )
Expand All @@ -126,9 +126,9 @@ the `String` representation (`toString()`) should always work.

```groovy
// do the import
import io.wcm.tooling.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.tooling.jenkins.pipeline.utils.logging.Logger
import static io.wcm.tooling.jenkins.pipeline.utils.ConfigConstants.*
import io.wcm.devops.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.devops.jenkins.pipeline.utils.logging.Logger
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
Map config = [ (LOGLEVEL) : LogLevel.DEBUG ]
Expand All @@ -149,9 +149,9 @@ This example will output all log levels with theis colors.

```groovy
// do the import
import io.wcm.tooling.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.tooling.jenkins.pipeline.utils.logging.Logger
import static io.wcm.tooling.jenkins.pipeline.utils.ConfigConstants.*
import io.wcm.devops.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.devops.jenkins.pipeline.utils.logging.Logger
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
Map config = [ (LOGLEVEL) : LogLevel.TRACE ]
Expand Down
2 changes: 1 addition & 1 deletion docs/managed-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The Example is based on the `execMaven` step.
This step loads a json and matches the incoming scm url against the entries to find matching settings ids to provide for the maven `shell` call.

```groovy
import io.wcm.tooling.jenkins.pipeline.managedfiles.ManagedFile
import io.wcm.devops.jenkins.pipeline.managedfiles.ManagedFile
ManagedFile autoLookupMavenSettings(String jsonPath, String scmUrl) {
// load and parse the json
Expand Down
22 changes: 12 additions & 10 deletions docs/tutorial-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,16 @@ It is recommended to use folder based shared library!
Pipeline job named 'Demo'
* Add the following script in the Pipeline script field:
```groovy
@Library ('pipeline-library') pipelineLibrary
import io.wcm.tooling.jenkins.pipeline.utils.logging.*
Logger.init(steps, LogLevel.INFO)
Logger log = new Logger(this)
log.info("This is an info log from the pipeline library")
```groovy
@Library ('pipeline-library') pipelineLibrary
import io.wcm.devops.jenkins.pipeline.utils.logging.*
Logger.init(steps, LogLevel.INFO)
Logger log = new Logger(this)
log.info("This is an info log from the pipeline library")
```
```
* run the job

Expand Down Expand Up @@ -293,8 +295,8 @@ the pipeline script to
@Library('pipeline-library@feature') pipelineLibrary
@Library('pipeline-library-example') pipelineLibraryExample
import io.wcm.tooling.jenkins.pipeline.utils.logging.Logger
import io.wcm.tooling.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.devops.jenkins.pipeline.utils.logging.Logger
import io.wcm.devops.jenkins.pipeline.utils.logging.LogLevel
Logger.init(steps, LogLevel.INFO)
Logger log = new Logger(this)
Expand Down
10 changes: 5 additions & 5 deletions docs/usage-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
## Example 1: Building a maven project with notifications

```groovy
import io.wcm.tooling.jenkins.pipeline.model.Tool
import io.wcm.tooling.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.tooling.jenkins.pipeline.utils.logging.Logger
import io.wcm.devops.jenkins.pipeline.model.Tool
import io.wcm.devops.jenkins.pipeline.utils.logging.LogLevel
import io.wcm.devops.jenkins.pipeline.utils.logging.Logger
import static io.wcm.tooling.jenkins.pipeline.utils.ConfigConstants.*
import static io.wcm.devops.jenkins.pipeline.utils.ConfigConstants.*
Map config = [
(SCM): [
Expand Down Expand Up @@ -42,4 +42,4 @@ try {
} finally {
notifyMail(config)
}
```
```
Loading

0 comments on commit c2aefba

Please sign in to comment.