Commit graph

135 commits

Author SHA1 Message Date
Gerald Pinder
a8cac2adc9 chore: Release 2024-12-03 04:36:13 -05:00
Gerald Pinder
2069eb513a chore: Prepare for the v0.9.0 release 2024-12-03 03:49:37 -05:00
Gerald Pinder
b4fbac2a66 feat(rechunk): Add the ability to rechunk an image 2024-12-02 02:23:22 -05:00
Gerald Pinder
ffa1789422 chore: Release 2024-12-02 01:27:15 -05:00
Gerald Pinder
1671ea2143 feat(prune)!: Create prune command 2024-11-27 14:30:29 -05:00
Gerald Pinder
3c6ad5ac25 chore: Release 2024-11-26 21:25:15 -05:00
Gerald Pinder
ddfacd3492 chore: Release 2024-11-25 20:04:13 -05:00
dependabot[bot]
69461796e9 chore(deps): bump clap-verbosity-flag from 2.2.3 to 3.0.0
Bumps [clap-verbosity-flag](https://github.com/clap-rs/clap-verbosity-flag) from 2.2.3 to 3.0.0.
- [Changelog](https://github.com/clap-rs/clap-verbosity-flag/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap-verbosity-flag/compare/v2.2.3...v3.0.0)

---
updated-dependencies:
- dependency-name: clap-verbosity-flag
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 12:50:25 -05:00
Gerald Pinder
31d0ba2162 chore: Release 2024-11-24 11:57:25 -05:00
Gerald Pinder
1f0e5af091 chore: Release 2024-11-24 11:51:52 -05:00
dependabot[bot]
b1381dc0f7 chore(deps): bump shadow-rs from 0.35.2 to 0.36.0
Bumps [shadow-rs](https://github.com/baoyachi/shadow-rs) from 0.35.2 to 0.36.0.
- [Release notes](https://github.com/baoyachi/shadow-rs/releases)
- [Commits](https://github.com/baoyachi/shadow-rs/compare/v0.35.2...v0.36.0)

---
updated-dependencies:
- dependency-name: shadow-rs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 17:20:21 -05:00
Gerald Pinder
918da22952
feat(init): Add the new/init subcommands (#85) 2024-11-14 20:15:12 -05:00
Gerald Pinder
752c957914 chore: Remove need to update .gitignore by making use of temporary directories 2024-11-07 00:01:23 -05:00
Gerald Pinder
5ff001816c chore(deps): Update more dependencies 2024-11-06 20:11:55 -05:00
dependabot[bot]
0dbf7e8e46 chore(deps): bump shadow-rs from 0.26.1 to 0.35.2
Bumps [shadow-rs](https://github.com/baoyachi/shadow-rs) from 0.26.1 to 0.35.2.
- [Release notes](https://github.com/baoyachi/shadow-rs/releases)
- [Commits](https://github.com/baoyachi/shadow-rs/compare/v0.26.1...v0.35.2)

---
updated-dependencies:
- dependency-name: shadow-rs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-06 20:02:46 -05:00
Gerald Pinder
1481fba40a feat: Use yaml-rust2 to get line numbers for better errors 2024-11-04 07:10:09 -05:00
Gerald Pinder
2fa3c88069 fix: Clean up error display for validate command 2024-11-01 15:50:39 -04:00
Gerald Pinder
9a3ad0ae17 feat: Add validation command 2024-10-30 18:08:50 -04:00
Gerald Pinder
32092195d3
chore: Cleanup workflows to be run from just (#238) 2024-10-07 16:34:36 -04:00
Gerald Pinder
7c5578994e chore: Release 2024-10-06 13:21:50 -04:00
Gerald Pinder
d2f3f6f756 chore: Release 2024-10-04 16:49:06 -04:00
Gerald Pinder
566380a82a chore: Release 2024-10-03 14:48:15 -04:00
Gerald Pinder
0c52cf6a54 refactor: Swtich to using bon for builder pattern 2024-09-21 18:42:28 -04:00
Gerald Pinder
ce717118ce chore: Release 2024-09-11 19:05:44 -04:00
Gerald Pinder
1177a6d873 chore: Upgrade sigstore to use contributed changes 2024-09-11 14:40:53 -04:00
Gerald Pinder
199d975305 chore: Release 2024-09-08 10:26:17 -04:00
Gerald Pinder
d4b511ebdb chore: Release 2024-09-07 18:59:56 -04:00
Gerald Pinder
e6cce3d542
feat(iso): Create generate-iso command (#192)
## Tasks

- [x] Add ctrl-c handler to kill spawned children
- [x] add more args to support all variables
- [x] Add integration test
2024-09-04 18:17:08 -04:00
Gerald Pinder
3dfe5785f7 chore: Update patch rev for sigstore 2024-09-01 14:23:14 -04:00
Gerald Pinder
43dd4ef842 chore: Release 2024-08-25 14:10:13 -04:00
Gerald Pinder
e4ad31c047 chore: Release 2024-08-20 09:04:17 -04:00
Gerald Pinder
8ce83ba7ff
refactor: Create SigningDriver and CiDriver (#197)
This also includes a new `login` command. The signing and CI logic is now using the Driver trait system along with a new experimental sigstore signing driver. New static macros have also been created to make implementation management easier for `Command` usage and `Driver` trait implementation calls.

---------

Co-authored-by: xyny <60004820+xynydev@users.noreply.github.com>
2024-08-12 23:52:07 -04:00
Gerald Pinder
7be5e00a31 chore: Release 2024-08-11 11:09:54 -04:00
Gerald Pinder
e36bb74231 fix: Builds failing due to new Rust version 2024-07-26 15:44:29 -04:00
Gerald Pinder
065fa193e3
refactor: Switch to using miette for errors instead of anyhow (#198)
Switch to a better error crate that will allow setting help texts for
any error we want.
2024-07-05 21:55:43 -04:00
Gerald Pinder
784be9869a
feat: Create RunDriver (#196)
This will be used for running containers for various tasks. There will
be a way to take all output from the process and a way to display output
from a running container like our builds have.
2024-07-05 19:20:38 -04:00
Gerald Pinder
4ca98c1c2a
feat(experimental): Build multiple recipes in parallel (#182)
The `build` subcommand can now take in any number of recipe files and
will build them all in parallel. Along with this new ability, I've added
a way to easily distinguish which part of the build log belongs to which
recipe. Check out the `docker_build` action of this PR for an example.


![gif](https://gitlab.com/wunker-bunker/wunker-os/-/raw/main/bluebuild.gif)

## Tasks

- [x] Make build log follow same pattern as normal logs to keep things
consistent
- [x] Update color ranges based on @xynydev 's feedback
- [x] Deal with ANSI control characters in log output
- [x] Add [`indicatif`](https://crates.io/crates/indicatif) to make logs
look nicer
- [x] Add ability to print logs to a file
2024-06-07 17:52:26 -04:00
Gerald Pinder
4f235be4f7 chore: Release 2024-06-03 09:54:28 -04:00
Gerald Pinder
b2aff68741 chore: Release 2024-05-28 22:59:17 -04:00
Gerald Pinder
9dd1ec90f4
fix: Remove hard requirement for login creds to be able to push (#187)
Related to https://github.com/blue-build/github-action/issues/48
2024-05-28 22:56:06 -04:00
Gerald Pinder
02b2fe5434
refactor!: Rename template to generate and move rebase/upgrade under switch (#116)
This updates the `template` subcommand to be `generate`. The `template`
usage will continue to work as an alias to `generate`. A new `switch`
command is added that will manage both `rpm-ostree rebase` and
`rpm-ostree upgrade` and is fully replacing the respective subcommands
as a breaking change.

The new `switch` command is under the feature flag `switch` and will
currently only build for the `main` branch builds until it is moved as a
default feature (`v0.9.0`).

Closes #159
2024-05-26 22:47:34 -04:00
Gerald Pinder
8069006c03
feat: Stages (#173)
## Stages

A new property (`stages`) is being added to the recipe file schema. This
property will allow users to define a list of Containerfile stages each
with their own modules. Stages can be used to compile programs, perform
parallel operations, and copy the results into the final image without
contaminating the final image.

### Module Support

Currently the only modules that work out-of-the-box are `copy`,
`script`, `files`, and `containerfile`. Other modules are dependent on
the programs installed on the image. In order to better support some of
our essential modules, a setup script is ran at the start of each stage
that is not `scratch`. This script will install `curl`, `wget`, `bash`,
and `grep` and use the package manager for the detected distributions.

At this time, the following distributions are supported:

- Debian
- Ubuntu
- Fedora
- Alpine

Contributions to increase the size of this list is
[welcome](https://github.com/blue-build/cli)!

### Syntax

- **Required**
- `from` - The full image ref (image name + tag). This will be set in
the `FROM` statement of the stage.
- `name` - The name of the stage. This is used when referencing the
stage when using the `from:` property in the `copy` module.
- `modules` - The list of modules to execute. The exact same syntax used
by the main recipe `modules:` property.
- **Optional**
- `shell` - Allows a user to pass in an array of strings that are passed
directly into the [`SHELL`
instruction](https://docs.docker.com/reference/dockerfile/#shell).

#### Example

```yaml
stages:
- name: ubuntu-test
  from: ubuntu
  modules:
  - type: files
    files:
    - usr: /usr
  - type: script
    scripts:
    - example.sh
    snippets:
    - echo "test" > /test.txt
  - type: test-module
  - type: containerfile
    containerfiles:
    - labels
    snippets:
    - RUN echo "This is a snippet"
```

### Tasks
- [x] `from-file:` - Allows the user to store their stages in a separate
file so it can be included in multiple recipes
- [x] `no-cache:` - This will be useful for stages that want to pull the
latest changes from a git repo and not have to rely on the base image
getting an update for the build to be triggered again.
- [x] Add setup script to be able to install necessary programs to run
`bluebuild` modules in stages
- [x] Check for circular dependencies and error out

## `copy` module

This is a 1-1 for the [`COPY`
instruction](https://docs.docker.com/reference/dockerfile/#copy). It has
the ability to copy files between stages, making this a very important
addition to complete functionality for the stages feature. Each use of
this "module" will become its own layer.

### Decision to use `--link`

We use the `--link`
[option](https://docs.docker.com/reference/dockerfile/#benefits-of-using---link)
which allows that layer to have the same hash if the files haven't
changed regardless of if the previous instructions have changed. This
allows these layers to not have to be re-downloaded on the user's
computer if the copied files haven't changed.

### Syntax

- **Required**
- `src` - The source directory/file from the repo OR when `from:` is set
the image/stage that is specified.
  - `dest` - The destination directory/file inside the working image.
- **Optional**
  - `from` - The stage/image to copy from.

#### Example

```yaml
modules:
- type: copy
  from: ubuntu-test
  src: /test.txt
  dest: /
```

### Tasks
- [x] make `from:` optional
- [x] Add README.md and module.yml

## Feature gating

Gating this feature until we release for `v0.9.0`. The plan will be to
build all features (including this one) for main branch builds. This
means that these features will be available when using the `main` image
and consequently the `use_unstable_cli:` option on the GitHub Action.
All future `v0.9.0` features will be gated as well to allow for patches
to `v0.8`.

### Tasks
- [x] Build `--all-features` on non-tagged builds
- [x] Add stages and copy features
2024-05-18 13:23:50 +00:00
Gerald Pinder
8308e5b285 chore: Release 2024-05-16 20:39:06 -04:00
Gerald Pinder
9b829151c3 chore: Remove a pre-release-replacement 2024-05-16 20:38:57 -04:00
Gerald Pinder
abedf4fc6b
fix: Use leniency for semver parsing (#184) 2024-05-16 20:15:14 -04:00
Gerald Pinder
eddbcb48f7 chore: Release 2024-05-14 10:14:54 -04:00
Gerald Pinder
5786ce40bf chore: Release 2024-05-05 01:18:08 -04:00
Gerald Pinder
50088db096 chore: Fix release replacements 2024-05-05 01:17:49 -04:00
Gerald Pinder
c2abf3fcb8
fix: Git sha not present during cargo install (#176) 2024-05-05 00:44:22 -04:00
Gerald Pinder
cfc39817fc chore: Release 2024-04-28 21:56:24 -04:00