Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vaelatern/nomad-driver-buildah
Using nomad to schedule jobs that run CI jobs, leveraging buildah-as-a-library
https://github.com/vaelatern/nomad-driver-buildah
Last synced: 20 days ago
JSON representation
Using nomad to schedule jobs that run CI jobs, leveraging buildah-as-a-library
- Host: GitHub
- URL: https://github.com/vaelatern/nomad-driver-buildah
- Owner: Vaelatern
- License: mpl-2.0
- Created: 2023-03-27T07:18:42.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-15T23:08:51.000Z (over 1 year ago)
- Last Synced: 2024-11-23T07:29:43.076Z (3 months ago)
- Language: Go
- Size: 104 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nomad-plugin-buildah-ci
A plugin for building containers using [buildah](https://buildah.io/)
on your Nomad cluster. You can use this tool to make use of the
machines you already have to build containers locally from
Containerfiles and Dockerfiles.## Example Build
Creating a task using the `buildah-ci` plugin
```
task "this-is-the-build-task" {
driver = "buildah-ci"
config {
dockerfile = "Dockerfile"
}
artifact {
source = "https://github.com/Vaelatern/mdbook-d2-go/archive/refs/heads/master.tar.gz"
destination = "./"
}
}
```Note that the resultant container doesn't get pushed anywhere. To
actually consume the container externally, you'll need to add
additional tasks that are part of a lifecycle that moves the built
container into one or more registries.## Deploying Driver Plugins in Nomad
The initial version of the skeleton is a simple task that outputs a
greeting. You can try it out by starting a Nomad agent and running
the job provided in the `example` folder:```sh
$ make build
$ nomad agent -dev -config=./example/agent.hcl -plugin-dir=$(pwd)# in another shell
$ nomad run ./example/example.nomad
$ nomad logs
```## What this plugin doesn't do
In order to maintain a clear focus for the plugin, the following items
are defined as out of scope:* We are not going to handle every possible way you have of running
a container.* We are not going to handle running containers other than to
execute a series of steps with some output at the end* We are not going to support skipping the final commit of a
container, even if it's garbage* We are not going to support all the ways a build can be tagged and
pushed to a server. Only authentication-free pushes to an OCI
registry MAY be supported. Use lifecycle tasks to achieve various
uploads.* We are not going to push artifacts, other than to allow them to
exist in the allocation directory. Use lifecycle tasks to achieve
various uploads.* We are not going to support downloading your repository. Use a
lifecycle task.