Skip to content

Commit 300415c

Browse files
Merge pull request #1 from jenkinsci/feature/JENKINS-43845
[JENKINS-43845] - Decouple EnvInject API from EnvInjectLib
2 parents 6e4ec05 + 3c48ac9 commit 300415c

File tree

18 files changed

+690
-702
lines changed

18 files changed

+690
-702
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Changelog
2+
===
3+
4+
### 1.0
5+
6+
Release date: Coming soon
7+
8+
* [JENKINS-43845](https://issues.jenkins-ci.org/browse/JENKINS-43845) -
9+
Create EnvInject API Plugin, which provides a shared [Jenkins EnvInject Library](https://github.com/jenkinsci/envinject-lib).
10+
* [JENKINS-43535](https://issues.jenkins-ci.org/browse/JENKINS-43535) -
11+
Provide new version of _EnvInject Library_ utility classes, which are compatible with non-`AbstractProject` job types.
12+
* Extend the migrated utility classes by methods migrated from [EnvInject Plugin](https://github.com/jenkinsci/envinject-plugin/).
13+
14+
#### Developer notes (1.0)
15+
16+
* `EnvInjectAction`, `EnvInjectException`, `EnvInjectLogger` classes stay in the original library due to the compatibility reasons.
17+
* Once a plugin adds dependency on this library, it is recommended to...
18+
* Remove explicit dependency on EnvInject Library
19+
* Replace all usages of the
20+
`org.jenkinsci.lib.envinject.service` package by the new methods offered by the plugin.
21+
22+
### Changes before 1.0
23+
24+
See [EnvInject Library changelog](https://github.com/jenkinsci/envinject-lib/blob/master/CHANGELOG.md).

Jenkinsfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Build the plugin using https://github.com/jenkins-infra/pipeline-library
2+
buildPlugin()

LICENSE.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License
2+
3+
Copyright (c) 2012-2017 Gregory Boissinot, Oleg Nenashev, and other Jenkins contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
22+

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
EnvInject API Plugin
2+
===
3+
4+
This is an API plugin, which encapsulates [Jenkins EnvInject Library](https://github.com/jenkinsci/envinject-lib)
5+
and provides additional API for environment variable management within Jenkins plugins.
6+
7+
This API plugin is mainly used in the [EnvInject Plugin](https://plugins.jenkins.io/envinject),
8+
but it can be used in other plugins as well.
9+
As an API plugin, it guarantees backward compatibility of API and does not contribute any user-visible components by default.
10+
11+
## Documentation
12+
13+
* [Changelog](CHANGELOG.md)
14+
* [Plugin Javadoc](http://javadoc.jenkins.io/plugin/envinject-api/)
15+
16+
## License
17+
18+
[MIT License](https://opensource.org/licenses/mit-license.php)

pom.xml

Lines changed: 57 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,70 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
22

3-
<modelVersion>4.0.0</modelVersion>
3+
<modelVersion>4.0.0</modelVersion>
44

5-
<parent>
6-
<groupId>org.jenkins-ci</groupId>
7-
<artifactId>jenkins</artifactId>
8-
<version>1.29</version>
9-
</parent>
5+
<parent>
6+
<groupId>org.jenkins-ci.plugins</groupId>
7+
<artifactId>plugin</artifactId>
8+
<version>2.26</version>
9+
</parent>
1010

11-
<groupId>org.jenkins-ci.lib</groupId>
12-
<artifactId>envinject-lib</artifactId>
13-
<version>1.25-SNAPSHOT</version>
14-
<packaging>jar</packaging>
15-
<name>Jenkins EnvInject Library</name>
16-
<url>https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin</url>
11+
<artifactId>envinject-api</artifactId>
12+
<version>1.0-SNAPSHOT</version>
13+
<packaging>jar</packaging>
14+
<name>EnvInject API Plugin</name>
15+
<description>Stores shared logic for Environment Injection management</description>
16+
<url>https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+API+Plugin</url>
1717

18-
<licenses>
19-
<license>
20-
<name>MIT license</name>
21-
<comments>All source code is under the MIT license.</comments>
22-
</license>
23-
</licenses>
18+
<licenses>
19+
<license>
20+
<name>MIT License</name>
21+
<url>http://www.opensource.org/licenses/mit-license.php</url>
22+
<distribution>repo</distribution>
23+
</license>
24+
</licenses>
2425

25-
<developers>
26-
<developer>
27-
<id>gbois</id>
28-
<name>Gregory Boissinot</name>
29-
<timezone>+1</timezone>
30-
<roles>
31-
<role>Project Owner</role>
32-
<role>Project Lead Developer</role>
33-
</roles>
34-
</developer>
35-
</developers>
26+
<developers>
27+
<developer>
28+
<id>oleg_nenashev</id>
29+
<name>Oleg Nenashev</name>
30+
<timezone>+1</timezone>
31+
</developer>
32+
</developers>
3633

37-
<properties>
38-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39-
<maven.compiler.source>1.6</maven.compiler.source>
40-
<maven.compiler.target>1.6</maven.compiler.target>
41-
<jenkins.core.version>1.532</jenkins.core.version>
42-
</properties>
34+
<properties>
35+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36+
<java.level>7</java.level>
37+
<jenkins.version>1.625.3</jenkins.version>
38+
</properties>
4339

44-
<scm>
45-
<connection>scm:git:git://github.com/jenkinsci/envinject-lib.git</connection>
46-
<developerConnection>scm:git:git@github.com:jenkinsci/envinject-lib.git</developerConnection>
47-
<tag>HEAD</tag>
40+
<scm>
41+
<connection>scm:git:ssh://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
42+
<developerConnection>scm:git:ssh://git@github.com/jenkinsci/${project.artifactId}-plugin.git</developerConnection>
43+
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
44+
<tag>HEAD</tag>
4845
</scm>
46+
47+
<dependencies>
48+
<dependency>
49+
<groupId>org.jenkins-ci.lib</groupId>
50+
<artifactId>envinject-lib</artifactId>
51+
<version>1.25</version>
52+
</dependency>
53+
</dependencies>
4954

50-
<dependencies>
55+
<repositories>
56+
<repository>
57+
<id>repo.jenkins-ci.org</id>
58+
<name>Jenkins Repository</name>
59+
<url>https://repo.jenkins-ci.org/public/</url>
60+
</repository>
61+
</repositories>
5162

52-
<dependency>
53-
<groupId>org.jenkins-ci.main</groupId>
54-
<artifactId>jenkins-core</artifactId>
55-
<version>${jenkins.core.version}</version>
56-
<scope>provided</scope>
57-
</dependency>
58-
59-
</dependencies>
60-
61-
<repositories>
62-
<repository>
63-
<id>repo.jenkins-ci.org</id>
64-
<name>Jenkins Repository</name>
65-
<url>http://repo.jenkins-ci.org/public/</url>
66-
</repository>
67-
</repositories>
68-
69-
<pluginRepositories>
70-
<pluginRepository>
71-
<id>repo.jenkins-ci.org</id>
72-
<url>http://repo.jenkins-ci.org/public/</url>
73-
</pluginRepository>
74-
</pluginRepositories>
63+
<pluginRepositories>
64+
<pluginRepository>
65+
<id>repo.jenkins-ci.org</id>
66+
<url>https://repo.jenkins-ci.org/public/</url>
67+
</pluginRepository>
68+
</pluginRepositories>
7569

7670
</project>

src/main/java/org/jenkinsci/lib/envinject/EnvInjectAction.java

Lines changed: 0 additions & 185 deletions
This file was deleted.

0 commit comments

Comments
 (0)