Skip to content

Commit

Permalink
Merge branch 'master' into search-overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed May 23, 2022
2 parents c58eb41 + 49f9f0c commit c27db22
Show file tree
Hide file tree
Showing 558 changed files with 4,895 additions and 3,765 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ A great PR typically begins with the line below.
Replace XXXXX with the numeric part of the issue's id you created on JIRA.
Please note that if you want your changes backported into LTS, you will need to create a JIRA ticket for it. Read https://www.jenkins.io/download/lts/#backporting-process for more.
-->
See [JENKINS-XXXXX](https://issues.jenkins-ci.org/browse/JENKINS-XXXXX).
See [JENKINS-XXXXX](https://issues.jenkins.io/browse/JENKINS-XXXXX).

<!-- Comment:
If the issue is not fully described in the ticket, add more information here (justification, pull request links, etc.).
Expand Down Expand Up @@ -56,4 +56,4 @@ Before the changes are marked as `ready-for-merge`:
- [ ] Changelog entries in the PR title and/or `Proposed changelog entries` are accurate, human-readable, and in the imperative mood
- [ ] Proper changelog labels are set so that the changelog can be generated automatically
- [ ] If the change needs additional upgrade steps from users, `upgrade-guide-needed` label is set and there is a `Proposed upgrade guidelines` section in the PR title. ([example](https://github.com/jenkinsci/jenkins/pull/4387))
- [ ] If it would make sense to backport the change to LTS, a Jira issue must exist, be a _Bug_ or _Improvement_, and be labeled as `lts-candidate` to be considered (see [query](https://issues.jenkins-ci.org/issues/?filter=12146)).
- [ ] If it would make sense to backport the change to LTS, a Jira issue must exist, be a _Bug_ or _Improvement_, and be labeled as `lts-candidate` to be considered (see [query](https://issues.jenkins.io/issues/?filter=12146)).
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
# Drafts your next Release notes as Pull Requests are merged into "master"
- name: Generate GitHub Release Draft
id: release-drafter
uses: release-drafter/release-drafter@v5.19.0
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Generates a YAML changelog file using https://github.com/jenkinsci/jenkins-core-changelog-generator
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish-release-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'adopt'
distribution: 'temurin'
java-version: 8
- name: Set version
id: set-version
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
wget -q https://get.jenkins.io/${REPO}/${PROJECT_VERSION}/${FILE_NAME}
- name: Upload Release Asset
id: upload-war
uses: actions/upload-release-asset@v1.0.2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Upload Release Asset
id: upload-deb
if: always()
uses: actions/upload-release-asset@v1.0.2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
- name: Upload Release Asset
id: upload-rpm
if: always()
uses: actions/upload-release-asset@v1.0.2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
- name: Upload Release Asset
id: upload-msi
if: always()
uses: actions/upload-release-asset@v1.0.2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
- name: Upload Release Asset
id: upload-suse-rpm
if: always()
uses: actions/upload-release-asset@v1.0.2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ work
*.iml
*.iws
*.ipr
.idea
/.idea/*
!/.idea/icon.svg
!/.idea/.name
out

# Eclipse and VSCode project files
Expand Down
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 81 additions & 0 deletions .idea/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,48 @@ the repository maintainers will integrate it, prepare changelogs, and
ensure it gets released in one of upcoming Weekly releases.
There is no additional action required from pull request authors at this point.

### Pull request management

The Jenkins project uses a well-defined set of labels to mark the status and content of pull requests.
The complete list of labels can be found at https://github.com/jenkinsci/jenkins/labels.
These labels are defined as follows:

- `needs-docs` marks a pull request as lacking documentation, either for developers (e.g., Javadoc) or users (e.g., changes to the [Jenkins handbook](https://www.jenkins.io/doc/book/)).
For such pull requests to be approved and merged, the corresponding changes to the documentation should be proposed.
If those changes belong to a separate repository (e.g., `jenkins-infra/jenkins.io`), a secondary pull request should be created in draft state in the other repository and reviewed in tandem with the primary pull request that proposes the code change.
- `needs-fix` marks a pull request which has pending requests for change that have not yet been addressed.
Such pull requests will not be merged until the code has been fixed and the tests pass.
- `needs-justification` marks a pull request where the reasoning is unclear, incomplete or not entirely cogent.
To properly evaluate the solution provided in a pull request, maintainers must be able to understand the high-level problem that the pull request attempts to solve.
While the context might be obvious to the author, it is not always apparent to reviewers and maintainers.
The use of design documents, high-level tracking epics, [minimal reproducible examples (MREs)](https://en.wikipedia.org/wiki/Minimal_reproducible_example), etc. is strongly encouraged.
- `needs-more-review` marks a pull request as lacking a sufficient number of reviews from subject-matter expert(s) (SME), either because the changes are complex and not sufficiently explained or because there is a lack of consensus regarding the proposed solution.
- `on-hold` marks a pull request that depends on another event and cannot be merged until the completion of that event.
When the dependent task has been completed, the pull request will be ready for merge.
- `proposed-for-close` marks a pull request where there is either no consensus on the next steps or where the next steps have not been taken and an extended period of time has elapsed.
Such pull requests are typically closed approximately one week after the label has been applied.
They can always be reopened once consensus has been reached on the next steps or when action is taken regarding these next steps.
- `ready-for-merge` marks a pull request that has met the acceptance criteria, as defined elsewhere in this document.
If there is no negative feedback, such pull requests are typically merged within approximately 24 hours.
- `stalled` marks a pull request that is off to a promising start but requires additional effort to reach completion - effort that appears to have been abandoned.
If the original author lacks the time and interest to continue the original effort, we suggest that someone else pick up where the original author left off to drive the effort to completion.
- `work-in-progress` marks a pull request that remains under active development.
Such pull requests are not ready for final review.

To ensure that pull requests are processed efficiently, the `ready-for-merge`, `stalled`, and `proposed-for-close` labels are subject to time constraints.

A pull request labeled with `ready-for-merge` is merged after approximately 24 hours if there is no negative feedback.

If a pull request has remained incomplete with no activity for over a month, we will make this explicit by labeling the PR as `stalled`.

If a pull request labelled as `stalled` remains inactive for yet another month, we will label it as `proposed-for-close` in order to maintain an orderly PR queue.
Approximately one week after this label is applied to a pull request, it will be closed.

While contributors are strongly encouraged to drive PRs to completion on their own, we recognize that in some situations the help of a maintainer can be valuable.
Yet also, we recognize that some contributors prefer not to receive unsolicited changes.
When opening a pull request, enabling the _Allow edits by maintainers_ option indicates that you accept that maintainers may push new commits into your pull request branch.
As some maintainers are willing to fix typographical errors and merge conflicts while reviewing pull requests, accepting edits from maintainers can speed up the integration of your pull request.

## IntelliJ suggestion

In case you are using IntelliJ, please adjust the default setting in respect to whitespace fixes on save.
Expand All @@ -122,6 +164,15 @@ This will help minimize the diff, which makes reviewing PRs easier.
We also do not recommend `*` imports in the production code.
Please disable them in Settings > Editor > Codestyle > Java by setting _Class count to use import with '*'_ and Names count to use import with '*'_ to a high value, e.g. 100.

The addition of `@{jenkins.addOpens}` to `argLine` exposes a bug in IntelliJ IDEA.
A patch has been proposed in [JetBrains/intellij-community#1976](https://github.com/JetBrains/intellij-community/pull/1976).
Pending the merge and release of this patch, IntelliJ IDEA users should work around the problem as follows:

1. Go to **Settings** > **Build, Execution, Deployment** > **Build Tools** > **Maven** > **Running Tests**.
2. Under "Pass to JUnit process [the] following `maven-surefire-plugin` and `maven-failsafe-plugin` settings", uncheck `argLine`.

Failure to work around the problem as described above will result in a `could not open '{jenkins.addOpens}'` failure when running tests in IntelliJ IDEA.

## Copyright

The Jenkins core is licensed under [MIT license], with a few exceptions in bundled classes.
Expand Down
17 changes: 6 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@
* It makes assumptions about plugins being installed, labels mapping to nodes that can build what is needed, etc.
*/

def buildNumber = BUILD_NUMBER as int; if (buildNumber > 1) milestone(buildNumber - 1); milestone(buildNumber) // JENKINS-43353 / JENKINS-58625

def failFast = false
// Same memory sizing for both builds and ATH
def javaOpts = [
'JAVA_OPTS=-Xmx1536m -Xms512m',
'MAVEN_OPTS=-Xmx1536m -Xms512m',
]

properties([
buildDiscarder(logRotator(numToKeepStr: '50', artifactNumToKeepStr: '3')),
Expand Down Expand Up @@ -43,7 +36,7 @@ for (i = 0; i < buildTypes.size(); i++) {
// First stage is actually checking out the source. Since we're using Multibranch
// currently, we can use "checkout scm".
stage('Checkout') {
checkout scm
infra.checkoutSCM()
}

def changelistF = "${pwd tmp: true}/changelist"
Expand All @@ -55,6 +48,7 @@ for (i = 0; i < buildTypes.size(); i++) {
realtimeJUnit(healthScaleFactor: 20.0, testResults: '*/target/surefire-reports/*.xml,war/junit.xml') {
def mavenOptions = [
'-Pdebug',
'-Penable-jacoco',
'--update-snapshots',
"-Dmaven.repo.local=$m2repo",
'-Dmaven.test.failure.ignore',
Expand All @@ -67,7 +61,7 @@ for (i = 0; i < buildTypes.size(); i++) {
'clean',
'install',
]
infra.runMaven(mavenOptions, jdk.toString(), javaOpts, null, true)
infra.runMaven(mavenOptions, jdk)
if (isUnix()) {
sh 'git add . && git diff --exit-code HEAD'
}
Expand All @@ -89,6 +83,7 @@ for (i = 0; i < buildTypes.size(); i++) {
error 'There were test failures; halting early'
}
if (buildType == 'Linux' && jdk == jdks[0]) {
publishCoverage calculateDiffForChangeRequests: true, adapters: [jacocoAdapter('coverage/target/site/jacoco-aggregate/jacoco.xml')]
def folders = env.JOB_NAME.split('/')
if (folders.length > 1) {
discoverGitReferenceBuild(scm: folders[1])
Expand Down Expand Up @@ -125,7 +120,7 @@ for (i = 0; i < buildTypes.size(); i++) {
dir(m2repo) {
archiveArtifacts(
artifacts: "**/*$changelist/*$changelist*",
excludes: '**/*.lastUpdated,**/jenkins-test*/',
excludes: '**/*.lastUpdated,**/jenkins-coverage*/,**/jenkins-test*/',
allowEmptyArchive: true, // in case we forgot to reincrementalify
fingerprint: true
)
Expand Down Expand Up @@ -153,7 +148,7 @@ builds.ath = {
'war',
'package',
]
infra.runMaven(mavenOptions, '11', javaOpts, null, true)
infra.runMaven(mavenOptions, 11)
dir('war/target') {
fileUri = 'file://' + pwd() + '/jenkins.war'
}
Expand Down
42 changes: 12 additions & 30 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ THE SOFTWARE.
<description>The module contains dependencies that are used by a specific Jenkins version</description>

<properties>
<asm.version>9.2</asm.version>
<asm.version>9.3</asm.version>
<slf4jVersion>1.7.36</slf4jVersion>
<stapler.version>1669.v95a_4b_919a_b_a_2</stapler.version>
<stapler.version>1685.v3b_5035c4ce05</stapler.version>
<groovy.version>2.4.21</groovy.version>
</properties>

Expand All @@ -53,11 +53,18 @@ THE SOFTWARE.
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>5.3.20</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<!-- https://docs.spring.io/spring-security/site/docs/5.5.4/reference/html5/#getting-maven-no-boot -->
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-bom</artifactId>
<version>5.6.2</version>
<version>5.7.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -166,7 +173,7 @@ THE SOFTWARE.
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.10.0</version>
<version>5.11.0</version>
</dependency>
<dependency>
<groupId>net.java.sezpoz</groupId>
Expand Down Expand Up @@ -242,7 +249,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>version-number</artifactId>
<version>1.9</version>
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
Expand All @@ -254,31 +261,6 @@ THE SOFTWARE.
<artifactId>instance-identity</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>launchd-slave-installer</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>slave-installer</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>systemd-slave-installer</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>upstart-slave-installer</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>windows-slave-installer</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
Expand Down
41 changes: 40 additions & 1 deletion cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

<properties>
<mina-sshd.version>2.8.0</mina-sshd.version>
<!-- Filled in by jacoco-maven-plugin -->
<jacocoSurefireArgs />
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -123,11 +125,14 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<!-- Version specified in grandparent POM -->
<configuration>
<argLine>@{jacocoSurefireArgs}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.3.0</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -209,4 +214,38 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>enable-jacoco</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<!-- Version specified in parent POM -->
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<propertyName>jacocoSurefireArgs</propertyName>
<includes>
<include>hudson/*</include>
<include>hudson/**/*</include>
<include>jenkins/*</include>
<include>jenkins/**/*</include>
<include>org/jenkins/**/*</include>
</includes>
<excludes>
<exclude>**/Messages.class</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading

0 comments on commit c27db22

Please sign in to comment.