Skip to content

Commit d21a0aa

Browse files
authored
Merge pull request #581 from cloudfoundry/metalink-cleanup
Move metalink files to repo root
2 parents 66a355d + 6addedd commit d21a0aa

19 files changed

Lines changed: 26 additions & 324 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ popd
3535
bundle exec rake stemcell:build_os_image[ubuntu,${short_name},${PWD}/tmp/ubuntu_base_image.tgz]
3636

3737
# build vSphere stemcell
38-
bundle exec rake stemcell:build_with_local_os_image[vsphere,esxi,ubuntu,${short_name},${PWD}/tmp/ubuntu_base_image.tgz]
38+
bundle exec rake stemcell:build[vsphere,esxi,ubuntu,${short_name},${PWD}/tmp/ubuntu_base_image.tgz]
3939
```
4040

4141
When building a vSphere stemcell, you must download `VMware-ovftool-*.bundle`
@@ -81,10 +81,10 @@ Rebuild the stemcell when you are making and testing BOSH-specific changes such
8181
export short_name="jammy"
8282
export build_number="0.0.8"
8383

84-
bundle exec rake stemcell:build_with_local_os_image[vsphere,esxi,ubuntu,${short_name},${PWD}/tmp/ubuntu_base_image.tgz,${build_number}]
84+
bundle exec rake stemcell:build[vsphere,esxi,ubuntu,${short_name},${PWD}/tmp/ubuntu_base_image.tgz,${build_number}]
8585
```
8686

87-
The arguments to `stemcell:build_with_local_os_image` are:
87+
The arguments to `stemcell:build` are:
8888

8989
1. `infrastructure_name`: Which IaaS you are producing the stemcell for.
9090
Determines which virtualization tools to package on top of the stemcell.
@@ -143,11 +143,11 @@ container):
143143

144144
### How to Run Tests for Stemcell
145145

146-
When you run the `stemcell:build_with_local_os_image` or `stemcell:build` rake
147-
task, it will create a stemcell that it runs the stemcell specific tests
148-
against. You will need to run the **rake task the first time you create your
149-
docker container**, but everytime after, as long as you do not destroy the
150-
container, you should be able to run the specific tests:
146+
When you run the `stemcell:build` rake task, it will create a stemcell that it
147+
runs the stemcell-specific tests against. You will need to run the **rake task
148+
the first time you create your docker container**, but every time after, as
149+
long as you do not destroy the container, you should be able to run the
150+
specific tests:
151151

152152
```shell
153153
cd /opt/bosh/bosh-stemcell; \

Rakefile

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -42,58 +42,8 @@ namespace :stemcell do
4242
end
4343
end
4444

45-
desc 'Download a remote pre-built base OS image'
46-
task :download_os_image, [:operating_system_name, :operating_system_version] do |_, args|
47-
begin
48-
puts "Using OS image #{args.operating_system_name}-#{args.operating_system_version}"
49-
50-
mkdir_p('tmp')
51-
52-
metalink_path = File.join(
53-
Dir.pwd,
54-
'bosh-stemcell',
55-
'image-metalinks',
56-
"#{args.operating_system_name}-#{args.operating_system_version}.meta4"
57-
)
58-
59-
os_image_path = File.join(Dir.pwd, 'tmp', 'base_os_image.tgz')
60-
`meta4 file-download --file #{args.operating_system_name}-#{args.operating_system_version}.tgz --metalink #{metalink_path} #{os_image_path}`
61-
raise 'Failed to download metalink' if $?.exitstatus != 0
62-
63-
puts "Successfully downloaded OS image to #{os_image_path}"
64-
rescue RuntimeError => e
65-
print_help
66-
raise e
67-
end
68-
end
69-
70-
desc 'Build a stemcell with a remote pre-built base OS image'
71-
task :build, [:infrastructure_name, :hypervisor_name, :operating_system_name, :operating_system_version, :build_number] do |_, args|
72-
begin
73-
Rake::Task['stemcell:download_os_image'].invoke(
74-
args.operating_system_name,
75-
args.operating_system_version
76-
)
77-
78-
os_image_path = File.join(Dir.pwd, 'tmp', 'base_os_image.tgz')
79-
args.with_defaults(build_number: '0000')
80-
81-
Rake::Task['stemcell:build_with_local_os_image'].invoke(
82-
args.infrastructure_name,
83-
args.hypervisor_name,
84-
args.operating_system_name,
85-
args.operating_system_version,
86-
os_image_path,
87-
args.build_number
88-
)
89-
rescue RuntimeError => e
90-
print_help
91-
raise e
92-
end
93-
end
94-
95-
desc 'Build a stemcell using a local pre-built base OS image'
96-
task :build_with_local_os_image, [:infrastructure_name, :hypervisor_name, :operating_system_name, :operating_system_version, :os_image_path, :build_number] do |_, args|
45+
desc 'Build a stemcell, requires `os_image_path` pointing at an image created via `stemcell:build_os_image`'
46+
task :build, [:infrastructure_name, :hypervisor_name, :operating_system_name, :operating_system_version, :os_image_path, :build_number] do |_, args|
9747
begin
9848
require 'bosh/stemcell/build_environment'
9949
require 'bosh/stemcell/definition'

bosh-stemcell/image-metalinks/#ubuntu-bionic/master/ubuntu-bionic/master/ubuntu-bionic.meta4

Lines changed: 0 additions & 22 deletions
This file was deleted.

bosh-stemcell/image-metalinks/#ubuntu-jammy/1.x/ubuntu-jammy/1.x/ubuntu-jammy.meta4

Lines changed: 0 additions & 22 deletions
This file was deleted.

bosh-stemcell/image-metalinks/#ubuntu-jammy/master/ubuntu-jammy/master/ubuntu-jammy.meta4

Lines changed: 0 additions & 22 deletions
This file was deleted.

bosh-stemcell/image-metalinks/#ubuntu-jammy/ubuntu-jammy/ubuntu-jammy.meta4

Lines changed: 0 additions & 22 deletions
This file was deleted.

bosh-stemcell/image-metalinks/#ubuntu_noble_poc/ubuntu_noble_poc/ubuntu-noble.meta4

Lines changed: 0 additions & 21 deletions
This file was deleted.

bosh-stemcell/image-metalinks/ubuntu-bionic.meta4

Lines changed: 0 additions & 22 deletions
This file was deleted.

bosh-stemcell/image-metalinks/ubuntu-jammy.meta4

Lines changed: 0 additions & 22 deletions
This file was deleted.

bosh-stemcell/image-metalinks/ubuntu-xenial.meta4

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)