Skip to content

Commit

Permalink
[FIX JENKINS-42602] Convert JDL and core-js to HPI & auto-watch all p…
Browse files Browse the repository at this point in the history
…lugins to bundle (#1257)
  • Loading branch information
kzantow authored Oct 21, 2017
1 parent 54b85a7 commit b998ba2
Show file tree
Hide file tree
Showing 71 changed files with 1,256 additions and 55,959 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false~
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ reports
acceptance-tests/runner/.blueocean-ath-jenkins-url
acceptance-tests/live.properties
src/main/groovy/pipeline.gdsl
nb-configuration.xml
nbactions.xml

2 changes: 0 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ node() {
stage('Building JS Libraries') {
sh 'node -v && npm -v'
sh 'npm --prefix ./js-extensions run build'
sh 'npm --prefix ./jenkins-design-language run build'
sh 'npm --prefix ./blueocean-core-js run build'
}

stage('Building BlueOcean') {
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ Core Web infrastructure that bootstraps BlueOcean UI and integrates REST API cor

## Building and running

At a minimum you will need JVM and Maven installed, if you are doing active JavaScript development, installing NodeJS is a good idea too.
At a minimum you will need a JVM and Maven installed, if you are doing active JavaScript development,
you may want to install NodeJS, but it is not a requirement as the `frontent-maven-plugin` will install
the correct version of Node locally for each plugin to build and develop with.

## Build everything (from root directory)
Builds all maven modules (run this the first time you check things out, at least)
Expand All @@ -84,6 +86,11 @@ Then open http://localhost:8080/jenkins/blue to start using Blue Ocean.

The Jenkins Classic UI exists side-by-side at its usual place at http://localhost:8080/jenkins.

NOTE: while running in this mode, Jenkins will automatically re-compile your Javascript files
and LESS files for all local plugins (including those linked with `hpi:hpl`) where a `package.json` is found
that contains a `mvnbuild` script. If you would like to disable this behavior, you may set
the system property: `-Dblueocean.features.BUNDLE_WATCH_SKIP=true`

## Browser compatibility

The obvious goal is for Blue Ocean to be runnable on all browsers on all platforms. We're not there yet, but getting
Expand Down Expand Up @@ -132,6 +139,8 @@ __NOTE__: look in the README.md of the respective modules for more detailed dev

#### NPM and shrinkwrap

- NOTE: after running `npm install` you will have some copies of Node you can use without installing it globally on your system,
e.g. from the repository root: `PATH=blueocean-web/node:$PATH npm <do-stuff>`
- Ensure your npm is 3.10.8+ as this release fixes some important bugs with shrinkwrap, notably #11735 in [notes](https://github.com/npm/npm/releases/tag/v3.10.8)
- Don't edit package.json directly; use npm install to ensure that both package.json and npm-shrinkwrap.json are updated.
- To add or update a dependency:
Expand Down
14 changes: 7 additions & 7 deletions acceptance-tests/runner/runtime-plugins/runtime-deps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,26 +86,26 @@
<artifactId>structs</artifactId>
<version>1.10</version>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>blueocean-executor-info</artifactId>
<version>0.1-beta-1</version>
<version>0.1-beta-3-SNAPSHOT</version>
<exclusions>
<exclusion> <!-- declare the exclusion here -->
<groupId>io.jenkins.blueocean</groupId>
<artifactId>blueocean</artifactId>
<artifactId>blueocean</artifactId>
</exclusion>
<exclusion> <!-- declare the exclusion here -->
<groupId>io.jenkins.blueocean</groupId>
<artifactId>blueocean-rest</artifactId>
<artifactId>blueocean-rest</artifactId>
</exclusion>
<exclusion> <!-- declare the exclusion here -->
<groupId>io.jenkins.blueocean</groupId>
<artifactId>blueocean-web</artifactId>
<artifactId>blueocean-web</artifactId>
</exclusion>
</exclusions>

</exclusions>
</dependency>
</dependencies>
<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public ExecutorPluginPage(WebDriver driver) {
public WebDriver driver;

public void open() {
driver.get(base + "/blue/organizations/jenkins/executor-info");
driver.get(base + "/blue/executor-info");
logger.info("Navigated to executor page");
}

Expand Down
4 changes: 1 addition & 3 deletions bin/checkdeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ packageFiles.push(require("../blueocean-config/package.json"));
packageFiles.push(require("../blueocean-pipeline-editor/package.json"));
packageFiles.push(require("../js-extensions/package.json"));
packageFiles.push(require("../blueocean-core-js/package.json"));

// Add some expected dependencies, so we go another level deep just for these
packageFiles.push(require("../blueocean-dashboard/node_modules/@jenkins-cd/design-language/package.json"));
packageFiles.push(require("../jenkins-design-language/package.json"));

packageFiles.forEach(packageFile => {

Expand Down
5 changes: 5 additions & 0 deletions bin/checkshrinkwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ function checkProject(pathToProject) {
const resolvedPath = buildPath(`${__dirname}/${pathToProject}`);
console.log(`validating dependencies in ${resolvedPath}`);
const packageJsonPath = buildPath(`${resolvedPath}/package.json`);
try {
fs.realpathSync(`${resolvedPath}/npm-shrinkwrap.json`);
} catch (error) {
return; // no shrinkwrap file, is ok for now
}
const shrinkwrapJsonPath = buildPath(`${resolvedPath}/npm-shrinkwrap.json`);

const packages = require(packageJsonPath);
Expand Down
Loading

0 comments on commit b998ba2

Please sign in to comment.