### Install Dependencies and Build JDL Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/jenkins-design-language/README.md Run these commands to install project dependencies, start the development server with Gulp, build the Storybook, and launch the site server. ```bash npm install npm run gulp npm run build-storybook npm run site-server ``` -------------------------------- ### Start a build Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Starts a new build for a pipeline. ```APIDOC ## POST /pipelines/{pipeline}/runs ### Description Starts a new build for a pipeline. ### Method POST ### Endpoint /pipelines/{pipeline}/runs ``` -------------------------------- ### Install nginx Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-github-pipeline/README.md Installs nginx with the sub-module using Homebrew. Ensure you have Homebrew installed. ```bash brew tap homebrew/nginx && brew install nginx-full --with-sub ``` -------------------------------- ### Start a New Build Source: https://context7.com/jenkinsci/blueocean-plugin/llms.txt Starts a new build for a pipeline. Returns a QueueItem indicating the build has been queued. ```APIDOC ## POST /organizations/{organization}/pipelines/{pipeline}/runs/ ### Description Starts a new build for a pipeline. This action queues the build and returns a `QueueItem` object. ### Method POST ### Endpoint /jenkins/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/ ### Request Body - **Content-Type**: application/json ### Response #### Success Response (200) - **_class** (string) - The class of the queue item. - **id** (string) - The ID of the queue item. - **expectedBuildNumber** (integer) - The expected build number. - **pipeline** (string) - The name of the pipeline. ``` -------------------------------- ### Start Storybook for JDL Component Development Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/jenkins-design-language/website/dev.md Run this command to start a local webpack server for developing and testing JDL components in isolation. The server watches for JavaScript changes. ```bash $ npm run storybook ``` -------------------------------- ### Start a Parameterized Build Source: https://context7.com/jenkinsci/blueocean-plugin/llms.txt Starts a new build for a pipeline with specified parameters. ```APIDOC ## POST /organizations/{organization}/pipelines/{pipeline}/runs/ ### Description Starts a new parameterized build for a pipeline. Parameters are provided in the request body. ### Method POST ### Endpoint /jenkins/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/ ### Request Body - **Content-Type**: application/json - **parameters** (array) - An array of objects, where each object defines a parameter with `name` and `value` fields. ### Request Example ```json { "parameters": [ { "name": "param1", "value": "def" } ] } ``` ### Response #### Success Response (200) - (QueueItem details) ``` -------------------------------- ### Start Storybook Development Server Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-dashboard/README.md Run this command to start the Storybook development server. It watches for JS changes and reloads the browser automatically. ```bash npm run storybook ``` -------------------------------- ### Start a parameterized build Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Starts a new parameterized build for a pipeline. ```APIDOC ## POST /pipelines/{pipeline}/runs/parameters ### Description Starts a new parameterized build for a pipeline. ### Method POST ### Endpoint /pipelines/{pipeline}/runs/parameters ``` -------------------------------- ### Start a Parameterized Build Source: https://context7.com/jenkinsci/blueocean-plugin/llms.txt Starts a new build for a pipeline with specified parameters. The parameters are provided in the request body as a JSON object. ```bash # Start a parameterized build curl -X POST -H 'Content-Type: application/json' \ http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/pipeline1/runs/ \ -d '{ "parameters": [{ "name": "param1", "value": "def" }] }' ``` -------------------------------- ### JUnit4 Test Setup with Guice Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/acceptance-tests/README.md Sets up a JUnit4 test class using Guice for dependency injection, including WebDriver, helper utilities, and page objects. The @Login annotation ensures the browser logs in at the start of each test. ```java //Makes the browser login at the start of every test in this class. @Login // Sets up the Guice DI and creates the WebDriver istan @RunWith(ATHJUnitRunner.class) @UseModules(AthModule.class) public class MyFirstATHTest{ // Base url for the browser to navigate to. e.g driver.get(baseUrl + "/blue/") @Inject @BaseUrl String baseUrl; // Helper functions for webdriver @Inject WaitUtil wait; // Incase direct access to the driver instance is needed @Inject Webdriver driver; // Page objects are injectable too @Inject DashboardPage dashboardPage; // Creates a temporary git repository to use in this test @Rule @Inject GitRepositoryRule repository; @Test public void myFirstTest() { dashboardpage.open(); // Waits for 10s for the url to contain the string pipelines. wait.until(ExpectedConditions.urlContains("pipelines")); wait.until(By.cssSelector("button.some.clazz")); .click(); } } ``` -------------------------------- ### Install slink for Local Development Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/jenkins-design-language/website/dev.md Install the slink tool globally. This utility helps manage local dependencies and avoid issues with `npm install` during development alongside other projects. ```bash $ npm install -g slink ``` -------------------------------- ### Example of Country-Related Property File Naming Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/docu/I18N.md Illustrates the hierarchical naming convention for locale-specific property files, starting from general language files to more specific country and variant files. ```properties Messages_en.properties Messages_en_au.properties Messages_en_US_SiliconValley.properties ``` -------------------------------- ### Get Detailed Map of Classes API Call Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Example cURL command to POST a list of classes to the classes API to get a detailed map of their capabilities. ```bash curl -v -X POST http://localhost:8080/jenkins/blue/rest/classes/ -d '{"q":["io.jenkins.blueocean.service.embedded.rest.PipelineImpl","io.jenkins.blueocean.service.embedded.rest.MultiBranchPipelineImpl"] ``` -------------------------------- ### Pipeline Permissions Example Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md This JSON structure represents the permissions granted to a user for a specific pipeline job. It indicates whether a user can create, start, stop, or read the pipeline. ```json { "permissions" : { "create" : false, "read" : true, "start" : false, "stop" : false } } ``` -------------------------------- ### Install Prerelease Version of Blue Ocean Core JS Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-core-js/README.md Use this script to install a prerelease version of blueocean-core-js into dependent modules. Ensure the version number matches the one published with the 'beta' tag. ```bash bin/cleanInstall.js @jenkins-cd/blueocean-core-js@0.0.90-SNAPSHOT-1 ``` -------------------------------- ### Start a parameterized build Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Starts a new build for a specified pipeline, allowing for the submission of build parameters. This is suitable for pipelines that require specific inputs to run. ```APIDOC ## POST /jenkins/blue/rest/organizations/jenkins/pipelines/{pipeline}/runs/ ### Description Starts a parameterized build for a given pipeline. ### Method POST ### Endpoint /jenkins/blue/rest/organizations/jenkins/pipelines/{pipeline}/runs/ ### Parameters #### Path Parameters - **pipeline** (string) - Required - The name of the pipeline to start a build for. #### Request Body - **parameters** (array) - Optional - An array of parameter objects, where each object has a 'name' and 'value' field. - **name** (string) - Required - The name of the parameter. - **value** (string) - Required - The value of the parameter. ### Request Example ```json { "parameters" : [{ "name" : "param1", "value" : "def" }] } ``` ### Response #### Success Response (200) - **QueueItemImpl object**: Contains details about the queued build, including its ID, expected build number, organization, pipeline name, and queued time. ``` -------------------------------- ### Locally Install JDL into Blue Ocean Projects Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/jenkins-design-language/website/dev.md Perform a local installation of your JDL checkout into Blue Ocean projects. This overrides the released JDL version from npm, allowing you to test changes directly. This is a temporary operation and can be undone by running `npm install`. ```bash $ cd blueocean/blueocean-web/ $ npm install ../../jenkins-design-language/ $ cd ../blueocean-dashboard/ $ npm install ../../jenkins-design-language/ ``` -------------------------------- ### Manually Install Prerelease Version Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-core-js/README.md Manually install a prerelease version of blueocean-core-js into dependent modules using npm. This is an alternative to using the cleanInstall.js script. ```bash npm install @jenkins-cd/blueocean-core-js@0.0.90-SNAPSHOT-1 -S -E ``` -------------------------------- ### Install Production Version of Blue Ocean Core JS Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-core-js/README.md Use this script to install a production version of blueocean-core-js into dependent modules. Ensure the version number matches the one published. ```bash bin/cleanInstall.js @jenkins-cd/blueocean-core-js@0.0.90 ``` -------------------------------- ### Manually Install Production Version Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-core-js/README.md Manually install a production version of blueocean-core-js into dependent modules using npm. This is an alternative to using the cleanInstall.js script. ```bash npm install @jenkins-cd/blueocean-core-js@0.0.90 -S -E ``` -------------------------------- ### Get All Organizations Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Retrieves a list of all available organizations. ```bash curl -v -X GET http://localhost:8080/jenkins/blue/rest/organizations/ ``` -------------------------------- ### JWT Token Header Example Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-jwt/README.md Example of the header section of a JWT token, containing key ID, algorithm, and token type. ```json {"kid":"63fa164eda09463c8fee26688f8196fd","alg":"RS256","typ":"JWT"} ``` -------------------------------- ### Get Pipeline Steps with Input Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Use this GET request to retrieve details of pipeline steps, specifically identifying those that are paused and awaiting interactive input. The response includes the input ID and parameters required for submission. ```bash curl -v -X GET http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/p31/runs/22/nodes/9/steps/ ``` ```json [ { "_class" : "io.jenkins.blueocean.rest.impl.pipeline.PipelineStepImpl", "_links" : { "self" : { "_class" : "io.jenkins.blueocean.rest.hal.Link", "href" : "/blue/rest/organizations/jenkins/pipelines/pipeline1/runs/1/steps/12/" }, "actions" : { "_class" : "io.jenkins.blueocean.rest.hal.Link", "href" : "/blue/rest/organizations/jenkins/pipelines/pipeline1/runs/1/steps/12/actions/" } }, "actions" : [...], "displayName" : "Wait for interactive input", "durationInMillis" : 81, "id" : "12", "input" : { "_class" : "io.jenkins.blueocean.rest.impl.pipeline.InputStepImpl", "_links" : { "self" : { "_class" : "io.jenkins.blueocean.rest.hal.Link", "href" : "/blue/rest/organizations/jenkins/pipelines/pipeline1/runs/1/steps/12/input/" } }, "id" : "C51b52435b43a326d5d4f92c290a64d5", "message" : "Please input branch to test against", "ok" : "Proceed", "parameters" : [ { "_class" : "hudson.model.StringParameterDefinition", "defaultParameterValue" : { "_class" : "hudson.model.StringParameterValue", "name" : "branch", "value" : "master" }, "description" : "", "name" : "branch", "type" : "StringParameterDefinition" } ], "submitter" : null }, "result" : "UNKNOWN", "startTime" : "2016-12-21T17:41:58.488+0530", "state" : "PAUSED" } ] ``` -------------------------------- ### Get Pipeline Steps Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Retrieves all steps for a pipeline run. ```APIDOC ## GET /runs/{runId}/steps ### Description Retrieves all steps for a pipeline run. ### Method GET ### Endpoint /runs/{runId}/steps ``` -------------------------------- ### Get Organization Details Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Fetches detailed information about a specific organization. ```bash curl -v -X GET http://localhost:8080/jenkins/blue/rest/organizations/jenkins ``` -------------------------------- ### Get a Pipeline Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Retrieves details for a specific pipeline within an organization. ```bash curl -v -X GET "http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/pipeline1" ``` -------------------------------- ### Pipeline Helper Test Example Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/acceptance-tests/README.md Demonstrates setting up a multi-branch pipeline with folders and jobs, creating it in Jenkins, waiting for builds to finish, and interacting with pipeline activities. Requires specific test runner and module annotations. ```java @Login @RunWith(ATHJUnitRunner.class) @UseModules(AthModule.class) public class MySecondATHTest{ @Inject MultiBranchPipelineFactory mbpFactory; @Rule @Inject public GitRepositoryRule git; @Rule @Inject public SSEClientRule sseClient; @Test public void mySecondTest() { // Sets up the pipeline model with folders and a job name MultiBranchPipeline pipeline = mbpFactory.pipeline(Folder.folders("afolder", "bFolder"), "pipelineName"); // Creates the pipeline in jenkins using the git repository rule. pipeline.createPipeline(git); // Wait for all runs to finish on the pipeline. Including all branches. sseClient.untilEvents(pipeline.buildsFinished); // Builds a bunch pipeline.buildBranch("master"); // Opens the activity page for this pipeline and verifies its not 404. pipeline.getActivityPage().open(); // Stops any runsa that are currently running on any branch job. pipeline.stopAllBuilds(); } } ``` -------------------------------- ### Start a Build Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Initiate a new build for a specified pipeline. The response provides details about the queued build, including its expected build number and queue time. ```bash curl -XPOST http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/pipeline3/runs/ ``` ```json { "_class" : "io.jenkins.blueocean.service.embedded.rest.QueueItemImpl", "_links" : { "self" : { "_class" : "io.jenkins.blueocean.rest.hal.Link", "href" : "/blue/rest/organizations/jenkins/pipelines/pipeline3/queue/3/" } }, "expectedBuildNumber" : 1, "id" : "3", "pipeline" : "pipeline3", "qeueudTime" : "2016-06-22T11:05:41.309+1200" } ``` -------------------------------- ### Get Class Details API Call Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Example cURL command to retrieve the capabilities supported by a specific BlueOcean class, such as io.jenkins.blueocean.service.embedded.rest.MultiBranchPipelineImpl. ```bash curl -v -X GET http://localhost:8080/jenkins/blue/rest/classes/io.jenkins.blueocean.service.embedded.rest.MultiBranchPipelineImpl ``` -------------------------------- ### Start a New Build Source: https://context7.com/jenkinsci/blueocean-plugin/llms.txt Initiates a new build for a pipeline. This POST request returns a QueueItem, which can be used to track the build's progress. ```bash # Start a new build (returns a QueueItem) curl -X POST -H 'Content-Type: application/json' \ http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/pipeline1/runs/ ``` -------------------------------- ### Get Pipeline Run Node Detail Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Retrieve detailed information for a specific node within a pipeline run. This includes its display name, edges, ID, start time, status, and state. ```bash curl -v http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/pipeline1/runs/1/nodes/3 ``` ```json { "displayName": "build", "edges": [ { "id": "9" } ], "id": "3", "startTime": "2016-03-11T00:32:52.273-0800", "status": "SUCCESS", "state": "FINISHED" } ``` -------------------------------- ### Get a Pipeline run node's detail Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Retrieves the details for a specific node within a pipeline run. This includes information such as the display name, edges, ID, start time, status, and state. ```APIDOC ## GET /organizations/jenkins/pipelines/{pipelineId}/runs/{runId}/nodes/{nodeId} ### Description Retrieves the details for a specific node within a pipeline run. ### Endpoint /organizations/jenkins/pipelines/{pipelineId}/runs/{runId}/nodes/{nodeId} ### Parameters #### Path Parameters - **nodeId** (string) - Required - The ID of the node to retrieve. ### Response #### Success Response (200) - **displayName** (string) - The display name of the node. - **edges** (array) - A list of edges connected to this node. - **id** (string) - The unique identifier of the node. - **startTime** (string) - The start time of the node execution. - **status** (string) - The status of the node execution (e.g., SUCCESS). - **state** (string) - The current state of the node (e.g., FINISHED). ### Request Example ```bash curl -v http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/pipeline1/runs/1/nodes/3 ``` ### Response Example ```json { "displayName": "build", "edges": [ { "id": "9" } ], "id": "3", "startTime": "2016-03-11T00:32:52.273-0800", "status": "SUCCESS", "state": "FINISHED" } ``` ``` -------------------------------- ### Run All Acceptance Tests (Docker Bitbucket Issue) Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/acceptance-tests/README.md Use this option if the Docker bitbucket test fails to start. ```bash ./run.sh -ld ``` -------------------------------- ### Get Pipeline Run Nodes Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Retrieve a list of nodes for a specific pipeline run. This includes details like display name, duration, ID, result, start time, and state. The response may include future nodes if the pipeline is in progress or failed. ```bash curl -v http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/pipeline1/runs/1/nodes/ ``` ```json [ { "displayName" : "build", "durationInMillis" : 219, "edges" : [ { "id" : "9" } ], "id" : "3", "result" : "SUCCESS", "startTime" : "2016-05-06T15:15:08.719-0700", "state" : "FINISHED" }, { "displayName" : "test", "durationInMillis" : 158, "edges" : [ { "id" : "13" }, { "id" : "14" }, { "id" : "15" } ], "id" : "9", "result" : "SUCCESS", "startTime" : "2016-05-06T15:15:08.938-0700", "state" : "FINISHED" }, { "displayName" : "unit", "durationInMillis" : 127, "edges" : [ { "id" : "35" } ], "id" : "13", "result" : "SUCCESS", "startTime" : "2016-05-06T15:15:08.942-0700", "state" : "FINISHED" }, { "displayName" : "integration", "durationInMillis" : 126, "edges" : [ { "id" : "35" } ], "id" : "14", "result" : "SUCCESS", "startTime" : "2016-05-06T15:15:08.944-0700", "state" : "FINISHED" }, { "displayName" : "ui", "durationInMillis" : 137, "edges" : [ { "id" : "35" } ], "id" : "15", "result" : "SUCCESS", "startTime" : "2016-05-06T15:15:08.945-0700", "state" : "FINISHED" }, { "displayName" : "deploy", "durationInMillis" : 47, "edges" : [ ], "id" : "35", "result" : "SUCCESS", "startTime" : "2016-05-06T15:15:09.096-0700", "state" : "FINISHED" } ] ``` -------------------------------- ### Get Pipeline run nodes Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Retrieves a list of nodes for a specific pipeline run. This includes details like display name, duration, edges, ID, result, start time, and state. The response may include future nodes if the pipeline is in progress or failed, indicated by null values for startTime, result, and state. ```APIDOC ## GET /organizations/jenkins/pipelines/{pipelineId}/runs/{runId}/nodes/ ### Description Retrieves a list of nodes for a specific pipeline run. ### Endpoint /organizations/jenkins/pipelines/{pipelineId}/runs/{runId}/nodes/ ### Response #### Success Response (200) - **displayName** (string) - The display name of the node. - **durationInMillis** (integer) - The duration of the node execution in milliseconds. - **edges** (array) - A list of edges connected to this node. - **id** (string) - The unique identifier of the node. - **result** (string) - The result of the node execution (e.g., SUCCESS, FAILURE). - **startTime** (string) - The start time of the node execution. - **state** (string) - The current state of the node (e.g., FINISHED). ### Request Example ```bash curl -v http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/pipeline1/runs/1/nodes/ ``` ### Response Example ```json [ { "displayName" : "build", "durationInMillis" : 219, "edges" : [ { "id" : "9" } ], "id" : "3", "result" : "SUCCESS", "startTime" : "2016-05-06T15:15:08.719-0700", "state" : "FINISHED" } ] ``` ``` -------------------------------- ### Maven Build Output Example Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/jenkins-design-language/examples/blue-ocean/index.html This snippet displays a typical output from a Maven build process for a Jenkins plugin. It includes dependency downloads, plugin executions, and build success messages. ```bash user@ComicalWorkstationName > mvn compile [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Visual pipeline editor plugin 1.0-alpha-2-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http://repo.jenkins-ci.org/public/org/kohsuke/access-modifier-checker/maven-metadata.xml Downloaded: http://repo.jenkins-ci.org/public/org/kohsuke/access-modifier-checker/maven-metadata.xml (447 B at 0.2 KB/sec) [INFO] [INFO] --- maven-hpi-plugin:1.115:validate (default-validate) @ pipeline-editor --- [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-maven) @ pipeline-editor --- [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:display-info (display-info) @ pipeline-editor --- [INFO] Maven Version: 3.3.9 [INFO] JDK Version: 1.8.0_45 normalized as: 1.8.0-45 [INFO] OS Info: Arch: x86_64 Family: mac Name: mac os x Version: 10.11.3 [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-banned-dependencies) @ pipeline-editor --- [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-versions) @ pipeline-editor --- [INFO] [INFO] --- download-maven-plugin:1.2.1:wget (get-node) @ pipeline-editor --- [INFO] File already exist, skipping [INFO] [INFO] --- download-maven-plugin:1.2.1:wget (get-npm) @ pipeline-editor --- [INFO] File already exist, skipping [INFO] [INFO] --- frontend-maven-plugin:0.0.23:install-node-and-npm (install node and npm) @ pipeline-editor --- [INFO] Node v4.0.0 is already installed. [INFO] Found NPM version 2.13.1 [INFO] [INFO] --- frontend-maven-plugin:0.0.23:npm (npm install) @ pipeline-editor --- [INFO] Running 'npm install --color=false' in /Users/josh/cloudbees/pipeline-editor-plugin [ERROR] npm WARN package.json cloudbees-pipeline-editor@0.0.1 No repository field. [ERROR] npm WARN package.json cloudbees-pipeline-editor@0.0.1 No license field. [ERROR] npm WARN package.json Dependency 'jenkins-js-builder' exists in both dependencies and devDependencies, using 'jenkins-js-builder@0.0.36' from dependencies [INFO] [INFO] --- maven-localizer-plugin:1.14:generate (default) @ pipeline-editor --- [INFO] [INFO] --- frontend-maven-plugin:0.0.23:gulp (gulp bundle) @ pipeline-editor --- [INFO] Running 'gulp bundle --no-color' in /Users/josh/cloudbees/pipeline-editor-plugin [INFO] [20:44:43] Maven project [INFO] [20:44:43] - src: src/main/js,src/main/less [INFO] [20:44:43] - test: src/test/js [INFO] [20:44:43] Setting defaults [INFO] [20:44:43] Bundle will be generated in directory 'src/main/resources/org/jenkinsci/plugins/pipelineeditor' as 'pipelineeditor.js'. [INFO] [20:44:43] Using gulpfile ~/cloudbees/pipeline-editor-plugin/gulpfile.js [INFO] [20:44:43] Starting 'bundle_pipelineeditor'... [INFO] [20:44:43] LESS CSS pre-processing completed. [INFO] [20:44:44] Finished 'bundle_pipelineeditor' after 688 ms [INFO] [20:44:44] Starting 'bundle'... [INFO] [20:44:44] Finished 'bundle' after 16 μs [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ pipeline-editor --- [debug] execute contextualize [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 4 resources [INFO] [INFO] --- maven-compiler-plugin:2.5:compile (default-compile) @ pipeline-editor --- [INFO] Nothing to compile - all classes are up to date [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8.421 s [INFO] Finished at: 2016-03-01T20:44:44+11:00 [INFO] Final Memory: 30M/339M [INFO] ------------------------------------------------------------------------ ``` -------------------------------- ### Run the proxy script Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-github-pipeline/README.md Navigates to the project directory and executes the proxy script. This makes Github.com available at http://localhost:9000/api/v3/. ```bash cd blueocean-github-pipeline ./run_proxy.sh ``` -------------------------------- ### Build BlueOcean Plugins Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/acceptance-tests/README.md Run this command from the top-level blueocean directory to build the plugins before running acceptance tests. ```bash mvn clean install -DskipTests -DcleanNode ``` -------------------------------- ### Fetch Pipeline List with Page Size Source: https://context7.com/jenkinsci/blueocean-plugin/llms.txt Shows how to retrieve a list of pipelines with a specified page size using the `start` and `limit` query parameters. This is a standard way to paginate list endpoints. ```bash curl "http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/?start=0&limit=10" ``` -------------------------------- ### Markdown Content Example Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/docu/I18N.md An example of a translation string that includes Markdown formatting, such as headings, text, and a hyperlink. ```markdown EmptyState.branches.notSupported=# Ramas no soportadas\nLa construcci\u00f3n de ramas (Branch) solo funciona con el tipo de job _Multibranch Pipeline_. Esto es solo uno de las muchas razones para cambiar a "Jenkins Pipeline".\n\n[M\u00e1s motivos](https://jenkins.io/doc/book/pipeline-as-code/) ``` -------------------------------- ### Start a build Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Initiates a new build for a specified pipeline. This is a basic trigger for a pipeline run without any specific parameters. ```APIDOC ## POST /jenkins/blue/rest/organizations/jenkins/pipelines/{pipeline}/runs/ ### Description Starts a new build for a given pipeline. ### Method POST ### Endpoint /jenkins/blue/rest/organizations/jenkins/pipelines/{pipeline}/runs/ ### Parameters #### Path Parameters - **pipeline** (string) - Required - The name of the pipeline to start a build for. ### Response #### Success Response (200) - **QueueItemImpl object**: Contains details about the queued build, including its ID, expected build number, and the time it was queued. ``` -------------------------------- ### Start a Parameterized Build Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-rest/README.md Trigger a build with specific parameters. This is applicable to free-style, pipeline, and multi-branch pipeline jobs. Ensure the 'Content-Type' header is set to 'application/json'. ```bash curl -XPOST -H 'Content-Type: application/json' http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/pipeline1/runs/ { "parameters" : [{ "name" : "param1", "value" : "def" }] } ``` ```json { "_class" : "io.jenkins.blueocean.service.embedded.rest.QueueItemImpl", "_links" : { "parent" : { "_class" : "io.jenkins.blueocean.rest.hal.Link", "href" : "/blue/rest/organizations/jenkins/pipelines/pipeline1/" }, "self" : { "_class" : "io.jenkins.blueocean.rest.hal.Link", "href" : "/blue/rest/organizations/jenkins/pipelines/pipeline1/queue/3/" } }, "expectedBuildNumber" : 2, "id" : "3", "organization" : "jenkins", "pipeline" : "pipeline1", "queuedTime" : "2016-12-22T15:43:52.866+0530" } ``` -------------------------------- ### Build All Maven Modules (Windows) Source: https://github.com/jenkinsci/blueocean-plugin/blob/master/README.md Builds all Maven modules, skipping tests, which is necessary when building on Windows. ```bash $ mvn clean install -DskipTests ``` -------------------------------- ### Registering and Rendering Extensions in Blue Ocean Source: https://context7.com/jenkinsci/blueocean-plugin/llms.txt Demonstrates how to register extensions using a YAML configuration and how to render them within a React component using ExtensionRenderer. Also shows programmatic lookup and filtering of extensions. ```yaml extensions: - component: EditorRoutes extensionPoint: jenkins.main.routes - component: PipelineEditorLink extensionPoint: jenkins.blueocean.rundetails.top.widgets dataType: org.jenkinsci.plugins.workflow.job.WorkflowRun - component: PipelineCreateButton extensionPoint: jenkins.pipeline.create.missing.jenkinsfile ``` ```jsx // Using ExtensionRenderer in a React component (host app side) import { ExtensionRenderer } from '@jenkins-cd/js-extensions'; function RunDetailHeader({ run }) { return (