Skip to content

Commit

Permalink
(SIMP-MAINT) Use the latest SSG tag (#72)
Browse files Browse the repository at this point in the history
The 'master' branch started failing to build so the SSG code was updated
to use the latest tag instead by default
  • Loading branch information
trevor-vaughan authored Jun 23, 2018
1 parent b8166a7 commit f3b6f35
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
### 1.10.9 /2018-06-14

### 1.10.9 /2018-06-22
* Ensure that the SSG is built from the latest tag instead of master
* Provide the option to pass a specific branch to the SSG builds
* Pin the suite base directory off of the global base directory instead of
local to wherever the system happenes to be at the time.

Expand Down
12 changes: 12 additions & 0 deletions lib/simp/beaker_helpers/ssg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ class SSG
GIT_REPO = 'https://github.com/OpenSCAP/scap-security-guide.git'
end

# If this is not set, the closest tag to the default branch will be used
GIT_BRANCH = nil

if ENV['BEAKER_ssg_branch']
GIT_BRANCH = ENV['BEAKER_ssg_branch']
end

EL_PACKAGES = [
'PyYAML',
'cmake',
Expand Down Expand Up @@ -139,6 +146,11 @@ def get_ssg_datastream
on(@sut, %(mkdir -p scap-security-guide && tar -xj -C scap-security-guide --strip-components 1 -f #{ssg_release} && cp scap-security-guide/*ds.xml #{@scap_working_dir}))
else
on(@sut, %(git clone #{GIT_REPO}))
if GIT_BRANCH
on(@sut, %(cd scap-security-guide; git checkout #{GIT_BRANCH}))
else
on(@sut, %(cd scap-security-guide; git checkout $(git describe --abbrev=0 --tags)))
end
on(@sut, %(cd scap-security-guide/build; cmake ../; make -j4 #{OS_INFO[@os][@os_rel]['ssg']['build_target']}-content && cp *ds.xml #{@scap_working_dir}))
end
end
Expand Down
5 changes: 5 additions & 0 deletions simp-beaker-helpers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'beaker-puppet_install_helper', '~> 0.6'
s.add_runtime_dependency 'highline', '~> 1.6'

# Because fog-opensack dropped support for Ruby < 2.2.0
if RUBY_VERSION <= '2.2.0'
s.add_runtime_dependency 'fog-openstack', '0.1.25'
end

### s.files = Dir['Rakefile', '{bin,lib,spec}/**/*', 'README*', 'LICENSE*'] & `git ls-files -z .`.split("\0")
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
Expand Down

0 comments on commit f3b6f35

Please sign in to comment.