Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
47f4f95
bump bosh-blobstore-gcs/0.0.376
Apr 10, 2026
435c123
[ci skip] bump OS image
Apr 10, 2026
6f0a721
CI: add git-lfs to the Docker container
aramprice Apr 10, 2026
d4fd5c2
Bump gems
cf-rabbit-bot Apr 11, 2026
4c90383
bump bosh-blobstore-dav/0.0.473
Apr 11, 2026
2382aa4
[ci skip] bump OS image
Apr 11, 2026
c4685af
bump bosh-blobstore-gcs/0.0.377
Apr 11, 2026
f978dc3
[ci skip] bump OS image
Apr 11, 2026
feb7c16
[ci skip] bump OS image
Apr 11, 2026
fe2ab98
bump bosh-blobstore-azure-storage/0.0.229
Apr 11, 2026
851b2e4
[ci skip] bump OS image
Apr 11, 2026
cb67658
[ci skip] bump OS image
Apr 13, 2026
87117e8
[ci skip] bump OS image
Apr 13, 2026
2d879e0
[ci skip] bump OS image
Apr 13, 2026
bb375ad
bosh-stemcell: move deps to gemspec remove unused gems
aramprice Apr 11, 2026
0806fab
Remove OSX spec options as they do not work
aramprice Apr 11, 2026
5bc9f63
Remove unused rubycop config
aramprice Apr 11, 2026
add91a8
Introduce standardrb; fix linter issues
aramprice Apr 11, 2026
229001f
Merge pull request #543 from cloudfoundry/deps-in-gemspec
aramprice Apr 13, 2026
c82bdee
Merge branch 'ubuntu-jammy' into merge-jammy
aramprice Apr 13, 2026
196cb0a
Bump actions/upload-artifact from 4 to 7
dependabot[bot] Apr 10, 2026
f0cd334
StemcellBuilder needs to bundle install now
aramprice Apr 13, 2026
037b146
Merge branch 'ubuntu-jammy' into merge-jammy
aramprice Apr 13, 2026
cd1edc8
Fix: remove vestiges of `vendor/`
aramprice Apr 13, 2026
137df55
Fixes: cleanup from vendored gem usage
aramprice Apr 14, 2026
af56b89
CI: cleanup shell issues; fix bundler invocation
aramprice Apr 14, 2026
62e0e36
Fix: invoke bundler in sudo
aramprice Apr 14, 2026
c349422
[ci skip] bump OS image
Apr 14, 2026
44e1e1b
CI: bundle as ubuntu; add `set -e` for sudo scripts
aramprice Apr 14, 2026
d69fd55
Fix: rake, rspec, etc are non-dev dependencies
aramprice Apr 14, 2026
f56d3fa
Merge branch 'ubuntu-jammy' into merge-jammy
aramprice Apr 14, 2026
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
2 changes: 0 additions & 2 deletions .bundle/config

This file was deleted.

1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
- name: test-bosh-stemcell
run: |
bundle install
bundle exec rspec
bundle exec rake
working-directory: bosh-stemcell/
2 changes: 1 addition & 1 deletion .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
mv tmp.sarif trivy-results-${n}.sarif
done

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: sbom
path: sbom.spdx.json
Expand Down
55 changes: 0 additions & 55 deletions .rubocop.yml

This file was deleted.

12 changes: 2 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
source 'https://rubygems.org'

group :development, :test do
gem 'bosh-stemcell', path: 'bosh-stemcell'
gem 'fakefs'
gem 'logging'
gem 'rake'
gem 'rspec'
gem 'rspec-instafail'
gem 'rspec-its'
gem 'timecop'
end
gem 'rake'
gem 'bosh-stemcell', path: 'bosh-stemcell'
18 changes: 3 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@ PATH
remote: bosh-stemcell
specs:
bosh-stemcell (0.0.0)
rake
rspec
rspec-its

GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.6.2)
fakefs (3.2.1)
little-plugger (1.1.4)
logging (2.4.0)
little-plugger (~> 1.1)
multi_json (~> 1.14)
multi_json (1.20.0)
rake (13.3.1)
rspec (3.13.2)
rspec-core (~> 3.13.0)
Expand All @@ -23,29 +20,20 @@ GEM
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-instafail (1.0.0)
rspec
rspec-its (2.0.0)
rspec-core (>= 3.13.0)
rspec-expectations (>= 3.13.0)
rspec-mocks (3.13.8)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.7)
timecop (0.9.10)

PLATFORMS
ruby

DEPENDENCIES
bosh-stemcell!
fakefs
logging
rake
rspec
rspec-instafail
rspec-its
timecop

BUNDLED WITH
2.5.23
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ container):
```shell
export short_name="noble"
cd /opt/bosh/bosh-stemcell
bundle install
OS_IMAGE=/opt/bosh/tmp/ubuntu_base_image.tgz bundle exec rspec -fd spec/os_image/ubuntu_${short_name}_spec.rb
```

Expand All @@ -150,6 +151,7 @@ container, you should be able to run the specific tests:

```shell
cd /opt/bosh/bosh-stemcell; \
bundle install; \
STEMCELL_IMAGE=/mnt/stemcells/vsphere/esxi/ubuntu/work/work/vsphere-esxi-ubuntu.raw \
STEMCELL_WORKDIR=/mnt/stemcells/vsphere/esxi/ubuntu/work/work/chroot \
OS_NAME=ubuntu \
Expand All @@ -173,25 +175,19 @@ an ubuntu chroot environment to run. For this reason, we use the
locally, run:

```shell
bundle install --local
cd /opt/bosh/bosh-stemcell
OS_IMAGE=/opt/bosh/tmp/ubuntu_base_image.tgz bundle exec rspec spec/ --tag shellout_types
```

If on macOS, run:

```shell
OSX=true OS_IMAGE=/opt/bosh/tmp/ubuntu_base_image.tgz bundle exec rspec spec/ --tag shellout_types
bundle install
OS_IMAGE=/opt/bosh/tmp/ubuntu_base_image.tgz bundle exec rake spec:shellout_types
```

### How to run tests for BOSH Linux Stemcell Builder

The BOSH Linux Stemcell Builder code itself can be tested with the following command's:

```shell
bundle install --local
cd /opt/bosh/bosh-stemcell
bundle exec rspec spec/
bundle install
bundle exec rake
```

## Troubleshooting
Expand Down
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'json'
require 'logging'

namespace :stemcell do
desc 'Build a base OS image for use in stemcells'
Expand Down
63 changes: 0 additions & 63 deletions bosh-stemcell/.rubocop.yml

This file was deleted.

3 changes: 3 additions & 0 deletions bosh-stemcell/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gemspec
12 changes: 12 additions & 0 deletions bosh-stemcell/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require "rspec/core/rake_task"
require "standard/rake"

task default: [:standard, :spec]

RSpec::Core::RakeTask.new(:spec)

namespace :spec do
RSpec::Core::RakeTask.new(:shellout_types) do |t|
t.rspec_opts = "--tag shellout_types"
end
end
36 changes: 22 additions & 14 deletions bosh-stemcell/bosh-stemcell.gemspec
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
# coding: utf-8
require File.expand_path('../lib/bosh/stemcell/version', __FILE__)
require File.expand_path("../lib/bosh/stemcell/version", __FILE__)

version = Bosh::Stemcell::VERSION

Gem::Specification.new do |spec|
spec.name = 'bosh-stemcell'
spec.version = version
spec.authors = 'Pivotal'
spec.email = 'support@cloudfoundry.com'
spec.description = 'Bosh::Stemcell provides tools to manage stemcells'
spec.summary = 'Bosh::Stemcell provides tools to manage stemcells'
spec.homepage = 'https://github.com/cloudfoundry/bosh'
spec.license = 'Apache 2.0'
spec.name = "bosh-stemcell"
spec.version = version
spec.authors = "Pivotal"
spec.email = "support@cloudfoundry.com"
spec.description = "Bosh::Stemcell provides tools to manage stemcells"
spec.summary = "Bosh::Stemcell provides tools to manage stemcells"
spec.homepage = "https://github.com/cloudfoundry/bosh"
spec.license = "Apache 2.0"

spec.required_ruby_version = Gem::Requirement.new('>= 1.9.3')
spec.required_ruby_version = Gem::Requirement.new(">= 1.9.3")

spec.files = Dir['README.md', 'lib/**/*'].select{ |f| File.file? f }
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.files = Dir["README.md", "lib/**/*"].select { |f| File.file? f }
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.require_paths = %w[lib]

# TODO: separate stemcell specs from gem specs
spec.add_dependency "rake"
spec.add_dependency "rspec"
spec.add_dependency "rspec-its"

# used only in gem's own specs
spec.add_development_dependency "fakefs"
spec.add_development_dependency "standard"
spec.add_development_dependency "timecop"
end
10 changes: 5 additions & 5 deletions bosh-stemcell/lib/bosh/core/shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ def run_command(command, options)
stdout.puts command if options[:output_command]
lines = []

if options[:env]
popen_args = if options[:env]
# Wrap in a shell because existing api to Shell#run takes a string
# which makes it really hard to pass it to popen with custom environment.
popen_args = [options[:env], ENV['SHELL'] || 'bash', '-c', command]
[options[:env], ENV["SHELL"] || "bash", "-c", command]
else
popen_args = command
command
end

io = IO.popen(popen_args)
Expand All @@ -50,7 +50,7 @@ def report(cmd, command_output, options)

redacted_cmd = cmd
if options[:redact]
redacted_cmd = redacted_cmd.gsub(/#{options[:redact].join('|')}/, "[REDACTED]")
redacted_cmd = redacted_cmd.gsub(/#{options[:redact].join("|")}/, "[REDACTED]")
end

err_msg = "Failed: '#{redacted_cmd}' from #{pwd}, with exit status #{$?.to_i}\n\n #{command_output}"
Expand All @@ -64,7 +64,7 @@ def command_exited_successfully?
def pwd
Dir.pwd
rescue Errno::ENOENT
'a deleted directory'
"a deleted directory"
end
end
end
4 changes: 2 additions & 2 deletions bosh-stemcell/lib/bosh/stemcell/arch.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module Bosh::Stemcell
class Arch
def self.arch
RbConfig::CONFIG['host_cpu']
RbConfig::CONFIG["host_cpu"]
end

def self.x86_64?
arch == 'x86_64'
arch == "x86_64"
end
end
end
Loading
Loading