Compare commits
1 commit
master
...
build_subc
Author | SHA1 | Date | |
---|---|---|---|
6384de2bc3 |
3 changed files with 29 additions and 12 deletions
|
@ -3,7 +3,7 @@
|
|||
# This script builds a Source Image via "drivers" to collect source
|
||||
|
||||
export ABV_NAME="SrcImg"
|
||||
# TODO maybe a flag for this?
|
||||
# no flag for this, as this convention needs to change
|
||||
export source_image_suffix="-source"
|
||||
|
||||
# output version string
|
||||
|
@ -33,6 +33,7 @@ _usage() {
|
|||
echo -e ""
|
||||
echo -e " Subcommands:"
|
||||
echo -e " unpack\tUnpack an OCI layout to a rootfs directory"
|
||||
echo -e " build\tBuilds a source image"
|
||||
echo -e ""
|
||||
}
|
||||
|
||||
|
@ -64,6 +65,12 @@ _subcommand() {
|
|||
ret=$?
|
||||
exit "${ret}"
|
||||
;;
|
||||
build)
|
||||
# XXX this is a stub and does not exist yet
|
||||
build_src_img "${@}"
|
||||
ret=$?
|
||||
exit "${ret}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
28
README.md
28
README.md
|
@ -1,12 +1,19 @@
|
|||
# BuildSourceImage
|
||||
|
||||
[![Build Status](https://travis-ci.org/containers/BuildSourceImage.svg?branch=master)](https://travis-ci.org/containers/BuildSourceImage)
|
||||
[![Container Image Repository on Quay](https://quay.io/repository/ctrs/bsi/status "Container Image Repository on Quay")](https://quay.io/repository/ctrs/bsi)
|
||||
|
||||
# BuildSourceImage
|
||||
|
||||
Tool to build a source image.
|
||||
The goal is to make retrieving the source code used to make a container image
|
||||
easier for users to obtain, using the standard OCI protocols and image formats.
|
||||
|
||||
## Use Cases
|
||||
|
||||
* Build a source image from an existing container image by introspection
|
||||
* Build a source code image from a collection of known `.src.rpm`'s
|
||||
* Include additional build context into the source image
|
||||
* Include extra sources used during the building of the resulting "works" of the cumulative sources
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
|
@ -27,24 +34,27 @@ Usage: BuildSourceImage.sh [-D] [-b <path>] [-c <path>] [-e <path>] [-r <path>]
|
|||
-h this usage information
|
||||
-v version
|
||||
|
||||
Subcommands:
|
||||
unpack Unpack an OCI layout to a rootfs directory
|
||||
build Builds a source image
|
||||
|
||||
```
|
||||
|
||||
Nicely usable inside a container:
|
||||
Nicely usable as container `quay.io/ctrs/bsi`:
|
||||
|
||||
* In this example we use only a prepared directory of `.src.rpm`'s:
|
||||
|
||||
```bash
|
||||
$> mkdir ./output/
|
||||
$> podman run -it -v $(pwd)/output/:/output/ -v $(pwd)/SRCRPMS/:/data/ -u $(id -u) quay.io/ctrs/bsi -s /data/ -o /output/
|
||||
```
|
||||
|
||||
## Examples
|
||||
## Demos
|
||||
|
||||
* Building from a fetched reference [![asciicast](https://asciinema.org/a/266340.svg)](https://asciinema.org/a/266340)
|
||||
* Building from a directory of src.rpms: [![asciicast](https://asciinema.org/a/266341.svg)](https://asciinema.org/a/266341)
|
||||
* Building from a directory of src.rpms and pushing it to a simple registry: [![asciicast](https://asciinema.org/a/266343.svg)](https://asciinema.org/a/266343)
|
||||
|
||||
## Use Cases
|
||||
## License
|
||||
|
||||
* Build a source image from an existing container image by introspection
|
||||
* Build a source code image from a collection of known `.src.rpm`'s
|
||||
* Include additional build context into the source image
|
||||
* Include extra sources use
|
||||
See the [LICENSE](./LICENSE) file.
|
||||
|
|
|
@ -25,9 +25,9 @@ While it's possible to kick the tests by calling `bats ./test/`, many of the tes
|
|||
If you are making local changes and have not rebuilt the container, then they will be missed.
|
||||
|
||||
Best to kick off the build like:
|
||||
|
||||
```bash
|
||||
make test-integration
|
||||
```
|
||||
This will rebuild the container if needed before running the tests.
|
||||
|
||||
##
|
||||
This will rebuild the container if needed before running the tests.
|
||||
|
|
Loading…
Add table
Reference in a new issue