Skip to content

Commit

Permalink
Merge branch 'master' into new-reorderable-list
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Sep 25, 2024
2 parents 281481c + 435bb79 commit b145d77
Show file tree
Hide file tree
Showing 11 changed files with 155 additions and 126 deletions.
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
{
"customType": "regex",
"fileMatch": [
"war/pom.xml"
"pom.xml"
],
"matchStrings": [
"<node.version>(?<currentValue>.*?)</node.version>"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ node_modules/

# Generated JavaScript Bundles
jsbundles

# In case someone accidentally runs npm install instead of yarn install
package-lock.json
9 changes: 6 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ MAVEN_OPTS='--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/ja

### Running the Yarn frontend build

> [!TIP]
> If you already have Node.js installed, you do not need to change your path. Start using `yarn` by enabling [Corepack](https://yarnpkg.com/corepack) with `corepack enable`, if it isn't already; this will add the `yarn` binary to your PATH.
To run the Yarn frontend build, after [building the WAR file](#building-the-war-file), add the downloaded versions of Node and Yarn to your path:

```sh
Expand All @@ -74,7 +77,7 @@ On one terminal, start a development server that will not process frontend asset
MAVEN_OPTS='--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED' mvn -pl war jetty:run -Dskip.yarn
```

Open another terminal and start a [webpack](https://webpack.js.org/) dev server, after [adding Node and Yarn to your path](#running-the-yarn-frontend-build):
Open another terminal and start a [webpack](https://webpack.js.org/) dev server, after [optionally adding Node and Yarn to your path](#running-the-yarn-frontend-build):

```sh
yarn start
Expand Down Expand Up @@ -108,13 +111,13 @@ To automatically fix backend issues, run:
mvn spotless:apply
```

To view frontend issues, after [adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:
To view frontend issues, after [optionally adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:

```sh
yarn lint
```

To fix frontend issues, after [adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:
To fix frontend issues, after [optionally adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:

```sh
yarn lint:fix
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
"@babel/cli": "7.25.6",
"@babel/core": "7.25.2",
"@babel/preset-env": "7.25.4",
"@eslint/js": "9.10.0",
"@eslint/js": "9.11.0",
"babel-loader": "9.2.1",
"clean-webpack-plugin": "4.0.0",
"css-loader": "7.1.2",
"css-minimizer-webpack-plugin": "7.0.0",
"eslint": "9.10.0",
"eslint": "9.11.0",
"eslint-config-prettier": "9.1.0",
"eslint-formatter-checkstyle": "8.40.0",
"globals": "15.9.0",
Expand All @@ -42,8 +42,8 @@
"postcss-preset-env": "10.0.3",
"postcss-scss": "4.0.9",
"prettier": "3.3.3",
"sass": "1.78.0",
"sass-loader": "16.0.1",
"sass": "1.79.3",
"sass-loader": "16.0.2",
"style-loader": "4.0.0",
"stylelint": "16.9.0",
"stylelint-checkstyle-reporter": "1.0.0",
Expand Down
134 changes: 61 additions & 73 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci</groupId>
<artifactId>jenkins</artifactId>
<version>1.122</version>
<version>1.123</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -73,9 +73,9 @@ THE SOFTWARE.
</issueManagement>

<properties>
<revision>2.478</revision>
<revision>2.479</revision>
<changelist>-SNAPSHOT</changelist>
<project.build.outputTimestamp>2024-09-17T13:51:35Z</project.build.outputTimestamp>
<project.build.outputTimestamp>2024-09-24T13:48:23Z</project.build.outputTimestamp>

<!-- configuration for patch tracker plugin -->
<project.patchManagement.system>github</project.patchManagement.system>
Expand Down Expand Up @@ -421,70 +421,6 @@ THE SOFTWARE.
<changelog.url>https://www.jenkins.io/changelog-stable</changelog.url>
</properties>
</profile>
<profile>
<id>yarn-ci-lint</id>
<activation>
<property>
<name>env.CI</name>
</property>
<file>
<exists>package.json</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.15.0</version>
<executions>
<execution>
<id>yarn lint:ci</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>lint:ci</arguments>
<skip>${yarn.lint.skip}</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>yarn-lint</id>
<activation>
<property>
<name>!env.CI</name>
</property>
<file>
<exists>package.json</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.15.0</version>
<executions>
<execution>
<id>yarn lint</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>lint</arguments>
<skip>${yarn.lint.skip}</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>yarn-execution</id>
<activation>
Expand Down Expand Up @@ -524,9 +460,8 @@ THE SOFTWARE.
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.15.0</version>
<version>1.15.1</version>
<executions>

<execution>
<id>install node and yarn</id>
<goals>
Expand All @@ -540,15 +475,13 @@ THE SOFTWARE.
<!-- tried to create a mirror for yarnDownloadRoot but it did not work -->
</configuration>
</execution>

<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
<phase>initialize</phase>
</execution>

<execution>
<id>yarn build</id>
<goals>
Expand All @@ -559,12 +492,34 @@ THE SOFTWARE.
<arguments>build</arguments>
</configuration>
</execution>

</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>yarn-ci-lint</id>
<activation>
<property>
<name>env.CI</name>
</property>
<file>
<exists>package.json</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.15.1</version>
<executions>
<execution>
<id>yarn lint</id>
<id>yarn lint:ci</id>
<goals>
<goal>yarn</goal>
</goals>
<phase>test</phase>
<configuration>
<arguments>lint:ci</arguments>
<skip>${yarn.lint.skip}</skip>
Expand All @@ -575,6 +530,39 @@ THE SOFTWARE.
</plugins>
</build>
</profile>
<profile>
<id>yarn-lint</id>
<activation>
<property>
<name>!env.CI</name>
</property>
<file>
<exists>package.json</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.15.1</version>
<executions>
<execution>
<id>yarn lint</id>
<goals>
<goal>yarn</goal>
</goals>
<phase>test</phase>
<configuration>
<arguments>lint</arguments>
<skip>${yarn.lint.skip}</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>clean-node</id>
Expand Down
4 changes: 2 additions & 2 deletions test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ THE SOFTWARE.
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>plugin-util-api</artifactId>
<version>4.1.0</version>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down Expand Up @@ -178,7 +178,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>2276.va_79e4182e71e</version>
<version>2289.vfd344a_6d1660</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down
4 changes: 2 additions & 2 deletions test/src/test/java/hudson/slaves/JNLPLauncherRealTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
package hudson.slaves;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasKey;
import static org.hamcrest.Matchers.is;

import hudson.ExtensionList;
import hudson.PluginWrapper;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.Slave;
import java.io.File;
import jenkins.agents.WebSocketAgentsTest;
import jenkins.slaves.JnlpSlaveAgentProtocol4;
import org.junit.Rule;
Expand Down Expand Up @@ -104,7 +104,7 @@ public void run(JenkinsRule r) throws Throwable {
p.setAssignedNode(agent);
FreeStyleBuild b = r.buildAndAssertSuccess(p);
if (webSocket) {
assertThat(agent.toComputer().getSystemProperties().get("java.class.path"), is(new File(r.jenkins.root, "agent.jar").getAbsolutePath()));
assertThat(agent.toComputer().getSystemProperties(), hasKey("os.name"));
}
System.err.println(JenkinsRule.getLog(b));
}
Expand Down
Loading

0 comments on commit b145d77

Please sign in to comment.