This repository contains a Docker container and associated convention for a build system that could be integrated with Stemn. The one container is intended to be used for each step of the build pipeline.
Run the ./build-container.sh
script to build the Docker container.
Run the ./run-pipeline.sh
script to run the build pipeline end to end.
The output of the build pipeline will be stored in freecad/export/output/output.url
.
├── build-container.sh
├── run-pipeline.sh
├── Dockerfile
├── freecad
│ ├── build
│ │ ├── app
│ │ │ ├── entrypoint.sh
│ │ │ └── fcstd_to_step_converter.py
│ │ ├── input -> ../prepare/output
│ │ └── output
│ ├── export
│ │ ├── app
│ │ │ ├── entrypoint.sh
│ │ │ └── gist.sh
│ │ ├── input -> ../build/output
│ │ └── output
│ └── prepare
│ ├── app
│ │ └── entrypoint.sh
│ ├── input
│ │ └── input.url
│ └── output
└── README.md
/input
contains the input files for the build pipeline stage.
/output
contains the outputs from the build pipelie stage.
/app/entrypoint.sh
contains the entrypoint to the build pipeline stage.
The /app/entrypoint.sh
path is invoked when the container starts. The /app
folder can contain any other scripts needed by the pipeline stage.
The input
and output
directories can contain anything. Each stage of the build pipeline can rely on its requisite inputs to be contained in /input
and will store its pipeline stage outputs in /output
.
The app
directory contains the files to be used in the pipeline stage, conventionally invoked by /entrypoint.sh
.
The name of the provider that this build pipeline is built for is at the root directory, in this case freecad
.
Within each provider directory there are the build stages, in this case prepare
, build
, export
.
Within each build stage directory there are input
and output
directories which are used as inputs and outputs to each stage respectively. There is also an app
directory which contains the entrypoint.sh
and files used as part of the build stage.
Some directories are symlinked as they are logically the same folder, for example, prepare/output => build/input
, build/output => export/input
.
The build process is broken into stages, which are composed in sequence into the build pipeline. By conforming to the convention above, each build stage of the build pipeline can use the same container design.
This pipeline uses the stages:
- Prepare - acquire the requisite files from the Stemn API.
- Build - run the build process.
- Export - upload the build artefact(s) to a server accessible by Stemn.