Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change config path to be relative to script #252

Merged
merged 1 commit into from
Nov 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ Below are instructions on installing and configuring a virtual machine to genera
git clone https://www.github.com/ManageIQ/manageiq-appliance-build.git
ln -s manageiq-appliance-build/bin bin
ln -s manageiq-appliance-build/scripts scripts
ln -s manageiq-appliance-build/config config
```

## Setup Imagefactory:
Expand Down
10 changes: 5 additions & 5 deletions scripts/vmbuild.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

BUILD_BASE = Pathname.new("/build")
GPG_DIR = Pathname.new("/root/.gnupg")
CFG_DIR = BUILD_BASE.join("config")
CFG_DIR = Pathname.new(__dir__).join("../config")
FILESHARE_DIR = BUILD_BASE.join("fileshare")
REFS_DIR = BUILD_BASE.join("references")
IMGFAC_DIR = BUILD_BASE.join("imagefactory")
Expand Down Expand Up @@ -64,9 +64,9 @@

$log.info "Using Configuration base directory: #{cfg_base}"

base_file = BUILD_BASE.join("config/base.json")
target_file = BUILD_BASE.join("config/target.json")
ova_file = BUILD_BASE.join("config/ova.json")
base_file = CFG_DIR.join("base.json")
target_file = CFG_DIR.join("target.json")
ova_file = CFG_DIR.join("ova.json")

def verify_run(output)
if output =~ /UUID: (.*)/
Expand Down Expand Up @@ -109,7 +109,7 @@ def verify_run(output)
$log.info "Building for #{target}:"

tdl_name = target.name == "azure" ? "base_azure.tdl" : "base.tdl"
tdl_file = BUILD_BASE.join("config", tdl_name)
tdl_file = CFG_DIR.join(tdl_name)
$log.info "Using inputs: puddle: #{puddle}, build_label: #{build_label}"
$log.info " tdl_file: #{tdl_file}, ova_file: #{ova_file}."

Expand Down