Environment Build Jobs

Environment build jobs produce runnable images for an Environment

Submitting build jobs

Once an Environment is created, you can click on the Submit Build icon for that job to produce a runnable image. Kaspian currently supports 3 types of environment build jobs.

Pre-built images

Pre-built images are useful for the scenario where the user is building images via an existing CI/CD pipeline. These can be registered for a given image repository by simply providing the relevant image tag (the component after the colon for a Docker URI). These builds will automatically succeed once submitted and the Environment will be immediately useable with a Valid status.

Python environment builds

Python environment builds are useful when the user primarily just needs to modify the Python packages installed on a default Kaspian image. Either a Conda environment YAML file or a PyPI requirements text file are supported. These must be specified by the Git repository URL referencing the file. These can be produced by visiting the appropriate location and copy-pasting from the browser address bar. PyPI requirements.txt are generally produced by running pip freeze > requirements.txt. Conda environment files are generally produced by running conda env export > environment.yml. For these jobs, Kaspian will generate a random image build tag and push it automatically to the Environment’s configured repository if successful.

Dockerfile builds

Dockerfile builds are useful for the scenario where the user is familiar with writing Dockerfiles and committing them to a Git repository. When submitting a Docker build job, the Docker context URL must be provided, i.e., the link to the Git repository path containing the Dockerfile. Generally, this should be the folder containing the Dockerfile. Kaspian currently supports references to GitHub and GitLab repositories. URLs can be generated by simply visiting the appropriate location and copy-pasting from the browser address bar. For these jobs, Kaspian will generate a random image build tag and push it automatically to the Environment’s configured repository if successful.

Inspecting build job results

Once Dockerfile or Python environment build jobs are submitted, the status of jobs can be visualized via the View Build Logs icon for that Environment. Simply select the appropriate build job run to view the logs produced and debug any failures that might have occurred. Here, you can view the Status of the build job run, the Image Tag that a successful build would be pushed to the image repository under, and a dump of Docker build logs.

Once a build job has been marked as succesful, the Environment will become valid. An Environment will always utilize the most recently-succeeded image build for compute jobs. Any further build jobs that fail will be ignored until the next successful run.