This repository contains code to build RPMs for ManageIQ appliances and container images:
- Clone source repos
- Run bundle install, compiles assets for UI and a few other tasks needed
- Create tarballs
- Build RPMs (locally in the container image or in Copr)
-
Build container image
-
Prepare configuration
- Create a local directory with an
options.yml
with the configuration changes you want to make, then when running the container image, mount that directory with-v <dir>:/root/OPTIONS
. - If overriding the NPM registry, set the
npm_registry
key in theoptions.yml
. - If building RPMs in Copr,
- set the
rpm.repo_name
key in theoptions.yml
. - run the container image with
-v <copr token file>:/root/.config/copr
.
- set the
- If updating the RPM repo it would be helpful to attach a volume to hold the RPM cache with
-v <dir>:/root/rpm_cache
. Any RPMs not in the cache will be downloaded to the cache first.
- Create a local directory with an
-
Start the container image
docker run -it <image>
-
Run the script
-
Run
bin/build.rb
, optionally overriding git ref (branch or tag) and release typebin/build.rb --git-ref jansa --update-rpm-repo
bin/build.rb --build-type release --git-ref jansa-1-alpha1 --update-rpm-repo
-
Alternatively, the build can be started directly by passing build
to the
docker run
command:
docker run -it <miq-rpm_build image> build [--build-type <type>] [--git-ref <ref>] [--update-rpm-repo]
The container will exit after the build is completed. Use -v <dir>:/root/BUILD
to
mount a volume, if artifacts need to be accessed later.
manageiq-core, manageiq-gemset and manageiq-appliance .tar.gz will be created in ~/BUILD/rpm_spec/
manageiq-* RPMs will be created in ~/BUILD/rpms
if built locally
This code is available as open source under the terms of the Apache License 2.0.