Code Monkey home page Code Monkey logo

constructor's Introduction

The Constructor Project

One-Liner: Build projects.

Rationale: The Quarkus project is based on Eclipse Vert.x. But between Vert.x and Quarkus, there are multiple projects to build before attempting an integration in Quarkus. Providing feedback to the Vert.x team is a long and hard process. For each project, you need to update the dependencies, then build, then switch to the next project, adapt the dependencies, and so on until you reach Quarkus. Constructor is a tool to help you build that chain. You list the repositories that need to be built, and it automatically adapts the dependencies and build them.

Configuration of the pipeline

Constructor is a command line tool taking as parameter a yaml file (default: constructor.yaml). This file lists the project to build. For example:

versions:
  vertx: 4.2.0.Beta1
pipelines:
  - name: main-build
      - repository: smallrye/smallrye-mutiny-vertx-bindings
        branchOrCommit: vertx.4.2.0.Beta1
        version: 2.14.0-SNAPSHOT
        commands:
          - mvn clean install
        dependencies:
           vertx.version: vertx
      - repository: smallrye/smallrye-reactive-messaging
        branchOrCommit: main
        version: 3.10.0-SNAPSHOT
        dependencies:
          vertx.version: vertx
          "smallrye-vertx-mutiny-clients.version": smallrye/smallrye-mutiny-vertx-bindings
      - repository: quarkusio/quarkus-http
        branchOrCommit: main
        version: 4.1.2-SNAPSHOT
        dependencies:
          vertx.version: vertx
      - repository: quarkusio/quarkus
        branchOrCommit: main
        version: 999-SNAPSHOT
        dependencies:
          vertx.version: vertx
          "smallrye-reactive-messaging.version": smallrye/smallrye-reactive-messaging
          "smallrye-mutiny-vertx-binding.version": smallrye/smallrye-mutiny-vertx-bindings
        commands:
          - mvn clean install -Dquickly

Versions

version is a dictionary containing name -> version pair. These entries will be used to resolve versions in the projects.

Pipelines

pipelines is the set of pipeline (ordered group of steps) you want to build. A pipeline has a name, and can have either a set of steps, or a stored in an external file. In that case, import is as follows:

pipelines:  
   - name: vert.x
     file: vertx.yaml
   - name: main
     steps: #... 

The imported pipeline is just a set of steps:

name: vert.x
steps:
 - repository: eclipse-vertx/vert.x
   branchOrCommit: master
   commands:
        - mvn clean install -DskipTests
  #...

The imported file path is resolved relatively from the main constructor file.

Steps (projects)

steps is the list of project to build in the pipeline. The order matters as constructor builds them in this order.

Each step's entry is a project and contains:

  • the repository (mandatory) - the identifier of the GitHub repository (organization/repository)
  • the branch or commit (default to the default branch) - the branch or commit to use.
  • the version - the expected version, required for resolving dependencies between projects
  • the commands - a sequence of shell command to run. Default is mvn clean install -DskipTests -DskipITs
  • the dependencies - a dictionary of variable|g:a -> repository|version.

The dependencies section is where the magic happens. Each entry instructs constructor to adapt the project. The key is either the name of a variable used in the project's pom.xml file or the groupid:artifactId of a dependency. The value is either the name of a repository or a key from the global versions dictionary. Constructor resolves each entry and adapts the project's pom.xml.

The CLI

The constructor CLI is a Quarkus application.

Usage: constructor build [-hV] [-r=<repo>] [-w=<work>] <constructor-file>
      <constructor-file>   The constructor pipeline description
  -h, --help               Show this help message and exit.
  -r, --local-repository=<repo>
                           The local repository directory
  -V, --version            Print version information and exit.
  -w, --work-dir=<work>    The working directory

IMPORTANT: All projects are build from a local maven repository which is not you ~/.m2/repository.

FAQ

Is Constructor only for Vert.x and Quarkus?

No, you can build any chain, as soon as the projects you need to build are using Maven as build tools.

Why only Maven?

Maven proposes easy ways to update dependencies and variables. Check the maven-versions-plugin for detail.

How to run my pipeline offline

At the moment you will need to build Constructor on your machine.

git clone https://github.com/cescoffier/Constructor constructor
cd constructor/constructor
mvn clean package -DskipTests

Then, you can run constructor using:

java -jar constructor/target/quarkus-app/quarkus-run.jar build <path to the pipeline file>

constructor's People

Contributors

cescoffier avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

constructor's Issues

Vert.x 4.2.x to Quarkus "main"

This issue reports the status of the daily execution of the Vert.x 4.2.x branches to Quarkus pipeline.
This pipeline builds:

  • The main development branch of Vert.x and related projects
  • SmallRye Mutiny Vert.x Bindings, SmallRye Stork, and SmallRye Reactive Messaging
  • Quarkus HTTP and Quarkus itself

Don't close this issue manually. This issue will be closed when the build gets fixed. It will be re-opened if it fails again later. You can subscribe to be notified of the status.

Vert.x "master" to Quarkus "main" pipeline status

This issue reports the status of the daily execution of the Vert.x to Quarkus pipeline.
This pipeline builds:

  • The main development branch of Vert.x and related projects
  • SmallRye Mutiny Vert.x Bindings, SmallRye Stork, and SmallRye Reactive Messaging
  • Quarkus HTTP and Quarkus itself

Don't close this issue manually. This issue will be closed when the build gets fixed. It will be re-opened if it fails again later. You can subscribe to be notified of the status.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.