jetty is a concurrent build system that processes build instructions from a file and executes them in a distributed manner using worker nodes. It's designed for efficiency, flexibility, and ease of use in complex build environments.
- Concurrent execution of build instructions
- Distributed processing with a worker pool
- Support for various build directives (ARG, ENV, RUN, CMD, DIR, CPY, WDR, SUB, FRM, BOX, USE, JET)
- Real-time build status tracking
- Asynchronous execution with *RUN flag
- Nested builds support with SUB directive
- Docker integration for containerized builds
jetty executes the build process for a given file by:
- Creating a worker pool
- Assigning the build to a worker
- Parsing and executing instructions from the file
- Handling concurrent execution of instructions
- Supporting asynchronous execution with *RUN
- Allowing nested builds with SUB directive
- Executing the final CMD instruction if present
Here's an example of a Jettyfile
showcasing various directives:
ARG TEST_ARG='arg works'
ENV TEST_ENV='env works'
RUN echo 'run works'
RUN echo $TEST_ENV
RUN echo $TEST_ARG \
echo 'multiline works' \
echo 1 \
echo 2 \
echo 3
*RUN sleep 5
DIR ./test
WDR ./test
DIR ./itworks
SUB ./sub-build.jetty
CMD echo 'it works'
- ARG: No specific symbols
- ENV: No specific symbols
- RUN: Can use "*" symbol
- CMD: No specific symbols
- DIR: No specific symbols
- CPY: Can use "*" symbol
- WDR: No specific symbols
- SUB: Can use "*" symbol
- FRM: No specific symbols
- JET: No specific symbols
- FMT: Can use "^", "$", "&" symbols
- BOX: No specific symbols
- USE: No specific symbols
- RUN, CPY: Can be prefixed with * for asynchronous execution
- FMT: Can use ^, $, & symbols for different formatting options
- Other directives: Do not have currently have specific symbol modifiers
-
Clone the repository:
git clone https://github.com/shmor3/jetty.git
-
Build the project:
cd jetty go build .
To see available commands:
./jetty -h
-
init: Create a new Jettyfile in the current directory
jetty init
-
ps: View the status of builds
jetty ps [-a] [-f filter]
Options:
-a
: Show all builds (active and completed)-f
: Filter builds (e.g., "id=buildid")
-
build: Run a new build
jetty build [-f filename]
Options:
-f
: Specify the build file (default: Jettyfile in current directory)
- Create a
Jettyfile
in your project directory - Run jetty in your project directory:
./jetty build
We welcome contributions! Please see our CONTRIBUTING.md file for details on how to contribute to jetty.
This project is licensed under the MIT License.
If you encounter any issues or have questions, please file an issue on the GitHub issue tracker.
Happy building with jetty! 🚀