diff --git a/README.md b/README.md index 33096dc568..6ae8dde07f 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ popd bundle exec rake stemcell:build_os_image[ubuntu,${short_name},${PWD}/tmp/ubuntu_base_image.tgz] # build vSphere stemcell -bundle exec rake stemcell:build_with_local_os_image[vsphere,esxi,ubuntu,${short_name},${PWD}/tmp/ubuntu_base_image.tgz] +bundle exec rake stemcell:build[vsphere,esxi,ubuntu,${short_name},${PWD}/tmp/ubuntu_base_image.tgz] ``` 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 export short_name="jammy" export build_number="0.0.8" -bundle exec rake stemcell:build_with_local_os_image[vsphere,esxi,ubuntu,${short_name},${PWD}/tmp/ubuntu_base_image.tgz,${build_number}] +bundle exec rake stemcell:build[vsphere,esxi,ubuntu,${short_name},${PWD}/tmp/ubuntu_base_image.tgz,${build_number}] ``` -The arguments to `stemcell:build_with_local_os_image` are: +The arguments to `stemcell:build` are: 1. `infrastructure_name`: Which IaaS you are producing the stemcell for. Determines which virtualization tools to package on top of the stemcell. @@ -143,11 +143,11 @@ container): ### How to Run Tests for Stemcell -When you run the `stemcell:build_with_local_os_image` or `stemcell:build` rake -task, it will create a stemcell that it runs the stemcell specific tests -against. You will need to run the **rake task the first time you create your -docker container**, but everytime after, as long as you do not destroy the -container, you should be able to run the specific tests: +When you run the `stemcell:build` rake task, it will create a stemcell that it +runs the stemcell-specific tests against. You will need to run the **rake task +the first time you create your docker container**, but every time after, as +long as you do not destroy the container, you should be able to run the +specific tests: ```shell cd /opt/bosh/bosh-stemcell; \ diff --git a/Rakefile b/Rakefile index ac59a00fa2..287b1ae269 100644 --- a/Rakefile +++ b/Rakefile @@ -42,58 +42,8 @@ namespace :stemcell do end end - desc 'Download a remote pre-built base OS image' - task :download_os_image, [:operating_system_name, :operating_system_version] do |_, args| - begin - puts "Using OS image #{args.operating_system_name}-#{args.operating_system_version}" - - mkdir_p('tmp') - - metalink_path = File.join( - Dir.pwd, - 'bosh-stemcell', - 'image-metalinks', - "#{args.operating_system_name}-#{args.operating_system_version}.meta4" - ) - - os_image_path = File.join(Dir.pwd, 'tmp', 'base_os_image.tgz') - `meta4 file-download --file #{args.operating_system_name}-#{args.operating_system_version}.tgz --metalink #{metalink_path} #{os_image_path}` - raise 'Failed to download metalink' if $?.exitstatus != 0 - - puts "Successfully downloaded OS image to #{os_image_path}" - rescue RuntimeError => e - print_help - raise e - end - end - - desc 'Build a stemcell with a remote pre-built base OS image' - task :build, [:infrastructure_name, :hypervisor_name, :operating_system_name, :operating_system_version, :build_number] do |_, args| - begin - Rake::Task['stemcell:download_os_image'].invoke( - args.operating_system_name, - args.operating_system_version - ) - - os_image_path = File.join(Dir.pwd, 'tmp', 'base_os_image.tgz') - args.with_defaults(build_number: '0000') - - Rake::Task['stemcell:build_with_local_os_image'].invoke( - args.infrastructure_name, - args.hypervisor_name, - args.operating_system_name, - args.operating_system_version, - os_image_path, - args.build_number - ) - rescue RuntimeError => e - print_help - raise e - end - end - - desc 'Build a stemcell using a local pre-built base OS image' - task :build_with_local_os_image, [:infrastructure_name, :hypervisor_name, :operating_system_name, :operating_system_version, :os_image_path, :build_number] do |_, args| + desc 'Build a stemcell, requires `os_image_path` pointing at an image created via `stemcell:build_os_image`' + task :build, [:infrastructure_name, :hypervisor_name, :operating_system_name, :operating_system_version, :os_image_path, :build_number] do |_, args| begin require 'bosh/stemcell/build_environment' require 'bosh/stemcell/definition' diff --git a/bosh-stemcell/image-metalinks/#ubuntu-bionic/master/ubuntu-bionic/master/ubuntu-bionic.meta4 b/bosh-stemcell/image-metalinks/#ubuntu-bionic/master/ubuntu-bionic/master/ubuntu-bionic.meta4 deleted file mode 100644 index a1ab2c0ca7..0000000000 --- a/bosh-stemcell/image-metalinks/#ubuntu-bionic/master/ubuntu-bionic/master/ubuntu-bionic.meta4 +++ /dev/null @@ -1,22 +0,0 @@ - - - 6c72db1d03708fae44a17d9f9be3420ad3ddde5e18bb1f8fb601e58710e8170da713b323a4d40fe783611a214c9920ccf6393ff6e7267512b84960f552d55901 - 2f8355ed75c694dff321a5f98f92a936fd35810305d50d35cfb6e35e630a2598 - 0c0c4cf1e0ba729e4f0c5c315b3a1de3c649f125 - 84e3fc496c6c7ac8d373fd56fa5d6ce3 - 286790464 - https://storage.googleapis.com/bosh-os-images/ubuntu-bionic/master/ubuntu-bionic.tgz - 337.0.0 - - - 903ef02644c352c516c55cbe7ed33e70b38a9b192ed0420f6ed226c411b2c677ee6f499c4f1989e08a759277fdee70949f72cdbe5d27b572c162283b2cfe5fa6 - d378f54909af9a9a70aec71b66d2ecfc51f5b53f88f3155c55c4b1760e8ba2d5 - 9d3e60fa24b62b7f5b55de9d8528505e6b404719 - d5ec64d573584692ba4865bae259bfa0 - 783601 - https://storage.googleapis.com/bosh-os-images/ubuntu-bionic/master/usn-log.json - 337.0.0 - - metalink-repository-resource/0.0.0 - 2023-06-13T01:13:20.928389437Z - diff --git a/bosh-stemcell/image-metalinks/#ubuntu-jammy/1.x/ubuntu-jammy/1.x/ubuntu-jammy.meta4 b/bosh-stemcell/image-metalinks/#ubuntu-jammy/1.x/ubuntu-jammy/1.x/ubuntu-jammy.meta4 deleted file mode 100644 index f1fc195dfe..0000000000 --- a/bosh-stemcell/image-metalinks/#ubuntu-jammy/1.x/ubuntu-jammy/1.x/ubuntu-jammy.meta4 +++ /dev/null @@ -1,22 +0,0 @@ - - - ca7be8bd19177a614a7a0717709cd009176c6cf7695a6f158395bc0f4c8bdaede0b7c42ec517cbcd99cc1558b2fdc7fb14862a76f6c305176d17355385d2a902 - bb332a8df57b505f7364a172e39f6ab95d67fa2a4ae642603371382a2297088d - 51ac3964bdafa2f248d48fca664283f292f22b44 - a1326ac5155905973b1409b343ce1a5e - 430860544 - https://storage.googleapis.com/bosh-os-images/ubuntu-jammy/1.x/ubuntu-jammy.tgz - 489.0.0 - - - b2b6f16a10d6ed63b77e3d073e072db6a7aec6eb672a30ba086e6f8e4b098175339be1d1e4354e8a8a7085d7f94fe83a77296f9eb334e855e81e68939a7e61a7 - 75523acfa75588b042de717aa305c2f8593e7a38acd8b8f77d66d9c569dbf0f3 - 2028feda31084fd95fb5c927316f9f8619f022ee - 457bf1471184262d36c87e632ce81aac - 52375 - https://storage.googleapis.com/bosh-os-images/ubuntu-jammy/1.x/usn-log.json - 489.0.0 - - metalink-repository-resource/0.0.0 - 2024-08-05T08:28:47.382242007Z - diff --git a/bosh-stemcell/image-metalinks/#ubuntu-jammy/master/ubuntu-jammy/master/ubuntu-jammy.meta4 b/bosh-stemcell/image-metalinks/#ubuntu-jammy/master/ubuntu-jammy/master/ubuntu-jammy.meta4 deleted file mode 100644 index cc873af8de..0000000000 --- a/bosh-stemcell/image-metalinks/#ubuntu-jammy/master/ubuntu-jammy/master/ubuntu-jammy.meta4 +++ /dev/null @@ -1,22 +0,0 @@ - - - 7e185e50222d73ef336bd7cbbabeb648bada80dcc9c11454a62a590677bdc91f6211f56bf96855bec6f042ac750807c4765173e6809f1b11287810e0cb5a7bc6 - 369b32914baa203571c6e0e7045c6c4b83476a3246a1f06dcda5c6a4da593e0f - 0563c2051357817f35cb54ccb52bdf06900ba787 - 4cc9365e967a151cd9eb246e6966561b - 430885414 - https://storage.googleapis.com/bosh-os-images/ubuntu-jammy/master/ubuntu-jammy.tgz - 850.0.0 - - - 0bc18d9cc8d05d855c21607ce55b78d5d142eeb976bda9656a59e94b4cf2163d09f05d1d503cac7269e9a3fe9afa02f7bb77f387793231819c410eeffd9824e2 - 11e8000a33cbffe5a373cb1ad4bf6a6a96a269ae6072c5acf65ba9041701b826 - 82955ee559be21ad61e838504b2e577e34ec3fc0 - 4dabc2d44dcf4b94d33e3fedd1af8313 - 1661991 - https://storage.googleapis.com/bosh-os-images/ubuntu-jammy/master/usn-log.json - 850.0.0 - - metalink-repository-resource/0.0.0 - 2024-08-05T23:29:41.609467109Z - diff --git a/bosh-stemcell/image-metalinks/#ubuntu-jammy/ubuntu-jammy/ubuntu-jammy.meta4 b/bosh-stemcell/image-metalinks/#ubuntu-jammy/ubuntu-jammy/ubuntu-jammy.meta4 deleted file mode 100644 index 1267922811..0000000000 --- a/bosh-stemcell/image-metalinks/#ubuntu-jammy/ubuntu-jammy/ubuntu-jammy.meta4 +++ /dev/null @@ -1,22 +0,0 @@ - - - aeb67552084cdaf656d3271c60af1c014504f90321824f7ee1d732245141c6c3e4e6099248e64b69ecc9efd23aad4f7e33e2a168ee0da17628d5e6c0ce6a195d - c4532445a354ffb390931fc90b88e088022dbfa6cdd96f0cf53101df24fcc922 - 2b10241972af61d276424c258dab5f6ff12e517c - 8c1ea20362da6d57baf869ab8262929d - 431120344 - https://storage.googleapis.com/bosh-os-images/ubuntu-jammy/ubuntu-jammy.tgz - 521.0.0 - - - 63bd875d5568422551a1c8ef227f221cfa4895646814fd1cdd2f31a3e8c2e1e825ea50f186fc9ef900c9129f972fce6e08d367e20246bd27bc93170351266271 - 922d2f9f187ddf68fe6a56f06e238581790076348c0ce64a7fda611e4d7ef723 - ab6cf9e744d297818c6b84c261bb664f95e75815 - 8df8f84785759c32205c39419fe29823 - 4281 - https://storage.googleapis.com/bosh-os-images/ubuntu-jammy/usn-log.json - 521.0.0 - - metalink-repository-resource/0.0.0 - 2024-09-05T18:43:31.624608394Z - diff --git a/bosh-stemcell/image-metalinks/#ubuntu_noble_poc/ubuntu_noble_poc/ubuntu-noble.meta4 b/bosh-stemcell/image-metalinks/#ubuntu_noble_poc/ubuntu_noble_poc/ubuntu-noble.meta4 deleted file mode 100644 index 4d224b9117..0000000000 --- a/bosh-stemcell/image-metalinks/#ubuntu_noble_poc/ubuntu_noble_poc/ubuntu-noble.meta4 +++ /dev/null @@ -1,21 +0,0 @@ - - - b2c51e76fe089e7f3cbbdcdf693111d6517dd25216128e7a819563ae0cf8c1bcda78d9649ea5968b1d58d6197d1ba952dfbbe6bb483c90e5711e81641b8e423d - 7012752463fb97a49d1b637f7abb0c81d36c39837f72fcfe41d0e9d52e033dde - ef083f3c99acf9e81035734327def290d229fc3b - 6c2d058faf24b879eed26983ebcb72e9 - 449041610 - https://storage.googleapis.com/bosh-os-images/ubuntu_noble_poc/ubuntu-noble.tgz - 76.0.0 - - - cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e - e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - da39a3ee5e6b4b0d3255bfef95601890afd80709 - d41d8cd98f00b204e9800998ecf8427e - https://storage.googleapis.com/bosh-os-images/ubuntu_noble_poc/usn-log.json - 76.0.0 - - metalink-repository-resource/0.0.0 - 2024-09-03T20:14:51.358532557Z - diff --git a/bosh-stemcell/image-metalinks/ubuntu-bionic.meta4 b/bosh-stemcell/image-metalinks/ubuntu-bionic.meta4 deleted file mode 100644 index 07ac6d8551..0000000000 --- a/bosh-stemcell/image-metalinks/ubuntu-bionic.meta4 +++ /dev/null @@ -1,22 +0,0 @@ - - - ebf171ff0c7d8828f70268a042acf531d0c86acf9e490285f3f1dc50d69c8f94e7bb098eeba5f1f6cbffab17a8d55b26e61543237fafa19676927a0fde096ffe - d6a7e2b46c4d8842b211a0ade6dea6062dc459dadcfd56b09cd4cd93a6b3bd23 - 9f6d42e90eda5e22c61c023d01d158847abb2e22 - 2cf1136f8106bd991922dceff5879d82 - 592226141 - https://storage.googleapis.com/bosh-os-images/master/ubuntu-bionic.tgz - 58.0.0 - - - a966aafa6db71036d8ab2c027d6d9e1c4ff69ea420b4cb15112e845485604b3d4e5544fae1d5309dafd91fa8586bb4257b83b696847d065a4f13253abe60edfc - 78c807665a366e8e050ec98b7316660ba4a98289032def133fdc224ac78b1017 - c068e1121ab0fc8bf97382fcfbd348112269299a - 87cea6edd48b9b78b5511c3cf423b3ae - 115637 - https://storage.googleapis.com/bosh-os-images/master/usn-log.json - 58.0.0 - - metalink-repository-resource/0.0.0 - 2021-10-12T16:55:27.035293067Z - diff --git a/bosh-stemcell/image-metalinks/ubuntu-jammy.meta4 b/bosh-stemcell/image-metalinks/ubuntu-jammy.meta4 deleted file mode 100644 index b4cc189f52..0000000000 --- a/bosh-stemcell/image-metalinks/ubuntu-jammy.meta4 +++ /dev/null @@ -1,22 +0,0 @@ - - - ff2c2fe45e6816b6867758f316a6d9ec48a7fb78b4b71d42481d5611f0836b28b4924c33f4479ac20e95148e07c476c12a7e3aea5ffb1dcc0a2a6655699d4900 - 1f7e5394d5eefee73e1638cdcd46fd8610064e9bb7ae0d9844e651fb273f6b1c - 34e816cdef091ce7a1b7d956125131287d24a732 - 60faefb24412736f45ca01b337916c78 - 850857569 - https://storage.googleapis.com/bosh-os-images/master/ubuntu-jammy.tgz - 12.0.0 - - - 876c8d1be3fae2fa371577754dc2f92d26210f648ed858d9076005a1185b22890f953ef15bbfabd4c7e009000b263fded55e0df3bbbe83a9726c3aad6f3ccd61 - 2141065cee76641e08a2b86c830e3197b74cfd948664478dc2c424e49378f868 - 3e424e5659d511819d491ce6076cdfad6a78e546 - 6eb0b13d11db4f4752e59b106ca67eef - 157253 - https://storage.googleapis.com/bosh-os-images/master/usn-log.json - 12.0.0 - - metalink-repository-resource/0.0.0 - 2021-12-03T23:58:09.916850729Z - diff --git a/bosh-stemcell/image-metalinks/ubuntu-xenial.meta4 b/bosh-stemcell/image-metalinks/ubuntu-xenial.meta4 deleted file mode 100644 index 42340e5b7a..0000000000 --- a/bosh-stemcell/image-metalinks/ubuntu-xenial.meta4 +++ /dev/null @@ -1,22 +0,0 @@ - - - e6281b91226d80cd7a3c2e836802fb8b978031be35f21f23dbff05b69f0a347e24060a6347d8b60168deebbe0310d713afa9b98b6c18c548a8c2ea49ebf9ab76 - aca00c3fca2f7e1f58a3c546a2f2f8b857593ebb499ab29f636ca22d0a8f3424 - 11d28429070fb6f71f333b61056d75613337499e - 1ea224d8ecc36ddbd5dfc56f051bc71a - 507551879 - https://s3.amazonaws.com/bosh-os-images/master/ubuntu-xenial.tgz - 95.0.0 - - - d5d30b89b36d3b47fb65fecf2f92a8b6bb0ae24c4923ee73f86d60750ec078cea2df9ee2ecec4bdf66fb18739ef5f90b01bc2d22a55c526712107b7e4276b2cb - f4c8f2e1f662d703d2c828cfa0a8c17301d680f8c26bec5430814578ed8d4886 - d92912b002dabd7a47196c0bb5131db465b5b0ca - 58aaa34702e47b31a46e6c76bccadfcf - 223715 - https://s3.amazonaws.com/bosh-os-images/master/usn-log.json - 95.0.0 - - metalink-repository-resource/0.0.0 - 2020-09-30T11:01:20.308981444Z - diff --git a/bosh-stemcell/image-metalinks/v1.0.0.meta4 b/bosh-stemcell/image-metalinks/v1.0.0.meta4 deleted file mode 100644 index b306b36afb..0000000000 --- a/bosh-stemcell/image-metalinks/v1.0.0.meta4 +++ /dev/null @@ -1,22 +0,0 @@ - - - eca2d80ab27bf779f6ded1a52df9a11c1bbdd8cc37bab19b536fd4bdbb39aac66e54b584630584f7efbdd934a50b174b55c707c5fc9dfedbe63de19bde79c9de - def0b4ece6cd6f0e5db3735733c88495a7332a7ab0b71e51628db1182e165c5d - d651d5be598fe4119b4fe7e606dfea044a30742c - 9dd9a33de65320fe2c314d4393570e6c - 504414568 - https://s3.amazonaws.com/bosh-os-images/ubuntu-xenial.tgz - 1.0.0 - - - a6bc47fabfbbb16d392bf31fc56ad47bcdaa3b2a566e6f91017e986e4b0d8e511034f3a41991cc76890bf8b73119c7f78e8e33d1257519bcd6c98bae02d58538 - 1ffdff9c2596ae766e90efc5f52610aa23b681a990596fa0ce207f1b5e58a9a0 - dd5e62f6183e77c1e6aef52235e19ce0a6275bce - 9f6bab5ad8e1448ed18de05d62e336aa - 19909 - https://s3.amazonaws.com/bosh-os-images/usn-log.json - 1.0.0 - - metalink-repository-resource/0.0.0 - 2019-10-10T18:12:07.291713659Z - diff --git a/bosh-stemcell/image-metalinks/v1c083164aeecc673509feb353f1367bd2154eb06.meta4 b/bosh-stemcell/image-metalinks/v1c083164aeecc673509feb353f1367bd2154eb06.meta4 deleted file mode 100644 index 87a47e6687..0000000000 --- a/bosh-stemcell/image-metalinks/v1c083164aeecc673509feb353f1367bd2154eb06.meta4 +++ /dev/null @@ -1,22 +0,0 @@ - - - 266165ec65aaa25cb08681906f6e4c5d3382be22d408c8e3a511ed6c77afcbd8aaacd92ba085673d8893418cc0838073b4220630c237226d3039cfc44655b18e - 591721c0baf41f2b127f23e9a65e10bf27e58e60d346b86a1c6e721336a3b3c1 - f3b904d921dea1f4f0c9809532a147a69208957a - 00f5b4cbee8fca6af57c6259bca1bb63 - 504445725 - https://s3.amazonaws.com/bosh-os-images/ubuntu-xenial.tgz - 1c083164aeecc673509feb353f1367bd2154eb06 - - - a6bc47fabfbbb16d392bf31fc56ad47bcdaa3b2a566e6f91017e986e4b0d8e511034f3a41991cc76890bf8b73119c7f78e8e33d1257519bcd6c98bae02d58538 - 1ffdff9c2596ae766e90efc5f52610aa23b681a990596fa0ce207f1b5e58a9a0 - dd5e62f6183e77c1e6aef52235e19ce0a6275bce - 9f6bab5ad8e1448ed18de05d62e336aa - 19909 - https://s3.amazonaws.com/bosh-os-images/usn-log.json - 1c083164aeecc673509feb353f1367bd2154eb06 - - metalink-repository-resource/0.0.0 - 2019-10-09T23:56:32.263413675Z - diff --git a/bosh-stemcell/image-metalinks/v6a93980804e95d6cc952219e10e38d79c47c310c.meta4 b/bosh-stemcell/image-metalinks/v6a93980804e95d6cc952219e10e38d79c47c310c.meta4 deleted file mode 100644 index fd444f727b..0000000000 --- a/bosh-stemcell/image-metalinks/v6a93980804e95d6cc952219e10e38d79c47c310c.meta4 +++ /dev/null @@ -1,22 +0,0 @@ - - - dad1b88448b2dc3e4e4bc46d45ef1ff28e0f82e35097fe4d4a243e01e359036ad7507ca1263ad2556c3acb0c5e57a06eff8dd4097cee2552ed756de34dd8cbed - 9f98f1753bc592344bfb739a2a4e5629f3439da9c403d37f43bf408533e69637 - bc9f1d08e9a7c25de8171708bf704d084e03783f - fb159e9f1236e1b5c382a21dfff1e3da - 504425620 - https://s3.amazonaws.com/bosh-os-images/ubuntu-xenial.tgz - 6a93980804e95d6cc952219e10e38d79c47c310c - - - a6bc47fabfbbb16d392bf31fc56ad47bcdaa3b2a566e6f91017e986e4b0d8e511034f3a41991cc76890bf8b73119c7f78e8e33d1257519bcd6c98bae02d58538 - 1ffdff9c2596ae766e90efc5f52610aa23b681a990596fa0ce207f1b5e58a9a0 - dd5e62f6183e77c1e6aef52235e19ce0a6275bce - 9f6bab5ad8e1448ed18de05d62e336aa - 19909 - https://s3.amazonaws.com/bosh-os-images/usn-log.json - 6a93980804e95d6cc952219e10e38d79c47c310c - - metalink-repository-resource/0.0.0 - 2019-10-10T00:17:56.310719609Z - diff --git a/ci/pipelines/builder.yml b/ci/pipelines/builder.yml index a83aaa0aeb..7db68e8d6e 100644 --- a/ci/pipelines/builder.yml +++ b/ci/pipelines/builder.yml @@ -943,7 +943,7 @@ resources: private_key: ((github_deploy_key_bosh-linux-stemcell-builder.private_key)) filters: - repositorypath: "(@= data.values.stemcell_details.branch @)/(@= data.values.stemcell_details.os_name @).meta4" - uri: git+ssh://git@github.com/cloudfoundry/bosh-linux-stemcell-builder.git//bosh-stemcell/image-metalinks/#(@= data.values.stemcell_details.branch @) + uri: git+ssh://git@github.com/cloudfoundry/bosh-linux-stemcell-builder.git//image-metalinks/#(@= data.values.stemcell_details.branch @) url_handlers: - include: - (s3|https)://.* @@ -981,7 +981,7 @@ resources: branch: (@= data.values.stemcell_details.branch @) ignore_paths: - ci - - bosh-stemcell/image-metalinks/ + - image-metalinks - VERSION uri: https://github.com/cloudfoundry/bosh-linux-stemcell-builder diff --git a/ci/tasks/build-release-metadata.sh b/ci/tasks/build-release-metadata.sh index 5ef9a4049d..8311ec71e3 100755 --- a/ci/tasks/build-release-metadata.sh +++ b/ci/tasks/build-release-metadata.sh @@ -47,7 +47,7 @@ if [[ "${OS_NAME}" == "ubuntu" ]]; then # Ensure URL for usn-log from metalink exists before attempting to download. usn_log_json_file="${REPO_PARENT}/bosh-linux-stemcell-builder/usn-log.json" touch "${usn_log_json_file}" - usn_metalink_path="${REPO_PARENT}/bosh-linux-stemcell-builder/bosh-stemcell/image-metalinks/${BRANCH}/${OS_NAME}-${OS_VERSION}.meta4" + usn_metalink_path="${REPO_PARENT}/bosh-linux-stemcell-builder/image-metalinks/${BRANCH}/${OS_NAME}-${OS_VERSION}.meta4" if [[ -n "$(meta4 file-urls --metalink "${usn_metalink_path}" --file usn-log.json)" ]]; then meta4 file-download \ --skip-hash-verification \ diff --git a/ci/tasks/build.sh b/ci/tasks/build.sh index 0b169ee9bd..d69d2b5cdc 100755 --- a/ci/tasks/build.sh +++ b/ci/tasks/build.sh @@ -24,6 +24,8 @@ check_param HYPERVISOR check_param OS_NAME check_param OS_VERSION +OS_IMAGE="$(readlink -f "${REPO_PARENT}/os-image-tarball"/*.tgz)" + export CANDIDATE_BUILD_NUMBER=$( cat "${REPO_PARENT}/version/number" | sed 's/\.0$//;s/\.0$//' ) git clone "${REPO_PARENT}/stemcells-index" "${REPO_PARENT}/stemcells-index-output" @@ -73,26 +75,15 @@ done chown -R ubuntu:ubuntu "${REPO_ROOT}" # ci resource chown -R ubuntu:ubuntu "${REPO_PARENT}/bosh-linux-stemcell-builder" chown -R ubuntu:ubuntu /mnt - -OS_IMAGE="" -mkdir -p "${REPO_PARENT}/os-image-tarball" -if [[ -n "$(ls -A "${REPO_PARENT}/os-image-tarball/")" ]]; then - OS_IMAGE="$(readlink -f "${REPO_PARENT}/os-image-tarball"/*.tgz)" -fi - sudo chmod u+s "$(which sudo)" + sudo --preserve-env --set-home --user ubuntu -- /bin/bash --login -i <