Commit Graph

17 Commits

Author SHA1 Message Date
Ghanshyam Mann cbf9d36df6 Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: Ib5a8155d76652044701ae05e5dbcc7078f41d863
2024-02-24 11:41:18 -08:00
Sagi Shnaidman 0b9fdccb8b Remove config of container_build_tool
Because there is no docker supported anymore, remove all custom
config of "container_build_tool", only "buildah" is supported.

Change-Id: I57720cc1d7da96f9277b62298cabce9ff7765f47
2021-08-11 10:24:31 +00:00
Kevin Carter bc21900d06 Fix become and remote_src when modifying an image
This change updates the copy task to assume the source is remote. This
will allow the module to use any path provided and not assume the file
is within the relative path from the role.

The become jinja used in the task "Modify image from {{ modify_dir_path }}"
was attempting to match on the full command executed, which would always
evaluate to `false`. This change corrects the condition so that it can
evaluate to true, when "buildah" is used.

Change-Id: I348dbf91b5f2e0dcdfeffd336782c24499d7a569
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-05-26 12:27:33 -05:00
Chandan Kumar b541c5ef99 Run all linters via pre-commit
Executes all linters via pre-commit, which is much faster, guarantees
their version locking and allows upgrading them with a single command.

Before this change the only linter running via pre-commit was
ansible-lint.

Now we also run bashate, flake8 and yamllint via pre-commit.

For developer convenience we still keep the old tox environments
which allow running a single linter.

Added long_description_content_type to fix twine check failure

Change-Id: I037eae61921b2a84aa99838804f70e96ee8d8b13
2019-02-15 18:22:10 +05:30
Steve Baker 9dac7d6d28 Use buildah commands for yum update to improve speed
This allows directly mounting directories instead of copying them
twice. Also the resulting image has only one extra layer instead of
one per Dockerfile directive.

Change-Id: I8a3769c0b55572ba05cc29ecd28a131cc94e8c4d
2019-01-17 07:35:59 +00:00
Alex Schultz 08903c0bab Fix line length for lint
Currently ansible-lint is complaining due to the line being >120 chars.

Change-Id: Ieab2cd4b303309603ef80bac932810b3a0d89115
2019-01-07 07:18:40 -07:00
Steve Baker 970708dd00 Use a tempfile for the modified Dockerfile
When using modify_image.yml directly with a multiple image prepare,
the Dockerfile.modified can be overwritten multiple times in a race
which causes the wrong images to be built.

This change uses a tempfile for the modified Dockerfile, avoiding this
issue.

yum_update.yml and rpm_install.yml is not affected by this because
they write out the Dockerfile to a temp directory for each image.

Change-Id: I374f76650ef0b0211d92435d66fdead2b7730b21
2018-11-13 17:20:03 +13:00
Zuul cb535e91df Merge "Cleanup modify directory" 2018-09-15 14:35:32 +00:00
Steve Baker 96b3971438 Cleanup modify directory
There is no need to let these directories clutter /tmp, unless the
modify tasks fail, then it should be left to allow debugging.

Change-Id: Ie258a997951cc17cee9d7b6978e7ecf53e3cffb6
2018-09-10 10:22:31 -06:00
Dan Prince b47b569b3c Fix local (non-root) docker build support
This was broken recently in a2229e738a
where the buildah support hard coded the modify command so that
it required a 'sudo' for the docker version.

Docker does not always require root for these commands. Also,
need to look further as to why buildah required this.

Change-Id: Iae231ec8bc8dc2822fc3d6bfab593cff3c599910
2018-09-06 08:26:14 -04:00
Emilien Macchi a2229e738a Add Buildah support
Buildag is a tool that facilitates building OCI container images.
This patch adds support to modify and update containers built by
Buildah.
It's just making sure we can run the build command with their CLI and
also get the user from the container config.
The default remains 'docker' for backward compatibility.

Note: it push the new images with sudo to avoid permissions errors.

Change-Id: I3db1934ad826ec6433bd6aec067112e91d82e355
2018-08-03 14:40:27 -04:00
Steve Baker 3eea261326 Use command instead of docker_image for docker build
The docker_image module doesn't support --network host, which is
required for the yum update to reach the network.
2018-05-11 13:05:24 +12:00
Steve Baker e40a425633 Move modify_dir_path out of precheck.yaml
yum-update.yaml will define modify_dir_path, so it won't exist during
precheck.
2018-05-04 13:09:55 +12:00
Steve Baker 60c8e52079 rename modified_image_prefix to target_image, use set_fact for timestamp
If set_fact is not used, the lookup(pipe) is evaluated every time it is
referenced, which means potentially different timestamps being
used.
2018-05-03 15:50:31 +12:00
Sam Doran 5963894199 Streamline role
Use role defaults rather than set_fact tasks.
Remove empty placeholder files.
Add role meta info.
For variables that can't have a sane default, add precheck tasks to fail early if they are not defined.
2018-05-02 22:31:08 -04:00
Steve Baker cf858399d5 task to yum update in the image 2018-05-02 17:05:59 +12:00
Steve Baker cad6e42217 Rename the main task to modify_image.yaml
There will be other tasks in this role.
2018-05-02 11:08:24 +12:00