/manageiq-rpm_build

Code to build RPMs for ManageIQ appliances and container images

Primary LanguageRubyApache License 2.0Apache-2.0

ManageIQ RPM Build

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)

Steps

  1. Build container image

  2. 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 the options.yml.
    • If building RPMs in Copr,
      • set the rpm.repo_name key in the options.yml.
      • run the container image with -v <copr token file>:/root/.config/copr.
    • 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.
  3. Start the container image

    docker run -it <image>

  4. Run the script

    • Run bin/build.rb, optionally overriding git ref (branch or tag) and release type

      bin/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.

Artifacts

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

License

This code is available as open source under the terms of the Apache License 2.0.