4eccc55233
test: build source image from a remote image reference
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-19 06:48:07 -04:00
83159669c4
Merge pull request #31 from vrothberg/helpers
...
test: add helpers.bash to reduce boilerplate
2019-09-19 12:10:09 +02:00
Valentin Rothberg
66ac3195c8
test: add helpers.bash to reduce boilerplate
...
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-19 11:58:44 +02:00
Daniel J Walsh
b77abbafa3
Merge pull request #30 from vbatts/non-root-container
...
Enable non-root container
2019-09-19 05:37:20 -04:00
a863652505
*: default the container to /tmp basedir for non-root
...
and adding an example to the README showing to run as non-root inside
the container as well.
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-19 05:26:34 -04:00
a8df221421
BuildSourceImage: fail early if mkdir fails
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-19 05:26:27 -04:00
Daniel J Walsh
525ae39ec3
Merge pull request #29 from vbatts/test
...
testing: test building a source image from src.rpms
2019-09-18 15:12:34 -04:00
7ebf051043
testing: test building a source image from src.rpms
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-18 12:25:48 -04:00
e6d201b553
Merge pull request #28 from vbatts/output_dir
...
*: clarify output directory written
2019-09-18 18:18:34 +02:00
Daniel J Walsh
1263c398f8
Merge pull request #27 from vbatts/makefile
...
Makefile: have cleanup and dependencies
2019-09-18 09:20:42 -04:00
cdd9e3aaef
*: clarify output directory written
...
Also, SRC_DIR is no longer used.
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-18 09:18:37 -04:00
be0266b073
Makefile: have cleanup and dependencies
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-18 09:17:44 -04:00
Valentin Rothberg
1a69fc0059
Merge pull request #26 from rhatdan/license
...
Re-license as GPLV2
2019-09-13 11:47:52 +02:00
Daniel J Walsh
22bb008514
Merge pull request #25 from vrothberg/fix-help
...
exit 0 on -h
2019-09-11 16:27:16 -04:00
Daniel J Walsh
522d9eecfb
Re-license as GPLV2
...
The code was originally licensed as GPL V3 and we thought that was
too restrictive, so we are lowering it to GPL V2
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-09-11 14:20:08 -04:00
Valentin Rothberg
b26fada584
exit 0 on -h
...
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-11 16:25:47 +02:00
Valentin Rothberg
ba7191aed9
Merge pull request #24 from vrothberg/add-integration-tests
...
add simple integration tests
2019-09-11 16:21:32 +02:00
Valentin Rothberg
07b19327a1
add simple integration tests
...
Add simple integration tests and integrate them into the CI.
More complex tests will be added later.
Fixes : #15
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-11 16:16:58 +02:00
Valentin Rothberg
270e07a34a
Merge pull request #23 from vrothberg/build-container
...
Add build-container make target
2019-09-11 12:04:48 +02:00
Valentin Rothberg
a42ed3883b
Add build-container make target
...
To avoid regressing on the Dockerfile, run the new make target in the CI
as well.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-11 11:53:47 +02:00
Valentin Rothberg
fc84cfdace
Merge pull request #18 from vbatts/clearer_driver_log
...
BuildSourceImage: group the driver log
2019-09-11 11:10:21 +02:00
Valentin Rothberg
114228365f
Merge pull request #22 from vrothberg/add-badge
...
README: add Travis CI badge
2019-09-11 11:09:42 +02:00
Valentin Rothberg
266849dae9
README: add Travis CI badge
...
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-11 11:08:23 +02:00
Valentin Rothberg
e6560ab399
Merge pull request #21 from vrothberg/enable-ci
...
Enable ci
2019-09-11 11:06:36 +02:00
Valentin Rothberg
9f4b80d054
Enable Travis CI
...
Enable a simple CI via Travis which currently install skopeo and
shellcheck and runs `make validate`.
Fixes : #13
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-11 11:00:48 +02:00
Valentin Rothberg
cbaca108b9
Add a Makefile
...
Add a simple Makefile with a `validate` target to run `shellcheck -a` on
the script.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-11 10:41:07 +02:00
Valentin Rothberg
48c7ea2cc2
Merge pull request #20 from vbatts/readme
...
README: updating for the new version
2019-09-11 08:50:59 +02:00
Valentin Rothberg
8faa7452f6
Merge pull request #19 from vbatts/rebase_cruft
...
BuildSourceImage: remove cruft from the rebase during rewrite
2019-09-11 08:46:50 +02:00
c0629904c3
README: updating for the new version
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 14:27:21 -04:00
513a7fd6f7
BuildSourceImage: remove cruft from the rebase during rewrite
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 11:12:14 -04:00
29899c15f5
BuildSourceImage: group the driver log
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 10:19:38 -04:00
Valentin Rothberg
43b2d2e7b5
Merge pull request #11 from vbatts/rewrite
...
Complete Rewrite
2019-09-10 15:39:15 +02:00
9fabac2890
BuildSourceImage: bail with information, if not inputs are provided
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:35:00 -04:00
84b889e1ad
BuildSourceImage: version flag
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:18:43 -04:00
433272896f
BuildSourceImage: switch to -s for SRPMs
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:10:56 -04:00
088e55ee76
*: more review updates from VR
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:44 -04:00
e99be3b2f8
Dockerfile: plugins for dnf download
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:41 -04:00
e6ca9482c8
BuildSourceImage: flipped condition!
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:39 -04:00
9f68658629
BuildSourceImage: changes for VR's review
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:37 -04:00
a4444e2e90
BuildSourceImage: lint cleanup reported by shellcheck -a
...
more info at https://www.shellcheck.net/wiki/
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:35 -04:00
b0940d1f87
Dockerfile: trim down to the bash rewrite
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:33 -04:00
89bfe5bf20
BuildSourceImage: basic function of pushing the image afterward
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:31 -04:00
9078c53d4c
BuildSourceImage: ensure that build from only SRPMS works
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:29 -04:00
adcad3d78a
BuildSourceImage: looks like golang ts of RFC 3339 is special
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:27 -04:00
977a003d16
*: tying it all together
...
this makes everything a flag now. This is not 100%
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:25 -04:00
b7e49bc1c6
awk: don't print the newline. Removes the need for a tr
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:23 -04:00
0d103e778f
BuildSourceImage: readying for the koji use case
...
for koji, there will be no fetching of the image, nor fetching of RPMS
using `dnf download --source ...`. They'll just provide a directory of
SRPMS used (perhaps as a composite of architectures). And just add these
in similar fashion as when fetching.
This used with the flag to specify which drivers to run will allow
tailoring to just that use-case.
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:21 -04:00
56fd7c4de9
*: big rewrite
...
_(this is a WIP)_
for the requirements to not be so bound to RPM only, breaking collection
of sources out into "plugins". Currently not much more sophisticated
than just iterating through bash functions that expect 3 argugments.
rootfs of the inspectee; output path for the sources collected; manifest
path.
The idea for the manifest is still loose, but how best to follow up the
plugin which collected source, to then have the rich metadata available
to attach to the individual "layers" that are produced for each source
component.
for the requirement of most contrained non-root container running this
script as non-root, we'll switch away from buildah for now. This ought
to just be skopeo copy, unpacking, inspecting, json, and skopeo copy. No
mounting, no namespacing, etc.
for the sake of writing unit tests (i.e. `bats`), break the script into
a way that it can be sourced and run the functions individually. Only
act like the whole script when run directly.
If `umoci` is available it will get used for some functions (like
unpacking), but it is not required and will be attempted with jq and
bash otherwise.
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:19 -04:00
f5db5f704f
Dockerfile and export image if OUTPUT_DIR
...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-09-10 09:08:12 -04:00
Daniel J Walsh
22a20a5e28
Merge pull request #9 from vbatts/errout
...
exit on errors
2019-08-15 06:36:41 -04:00