diff --git a/live-build/misc/ansible-roles/appliance-build.hyperscale-common/tasks/main.yml b/live-build/misc/ansible-roles/appliance-build.hyperscale-common/tasks/main.yml new file mode 100644 index 00000000..60c256f5 --- /dev/null +++ b/live-build/misc/ansible-roles/appliance-build.hyperscale-common/tasks/main.yml @@ -0,0 +1,20 @@ +# +# Copyright 2025 Delphix +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +- apt: + name: delphix-hyperscale + state: present diff --git a/live-build/variants/internal-hyperscale/ansible/playbook.yml b/live-build/variants/internal-hyperscale/ansible/playbook.yml new file mode 100644 index 00000000..2099ac28 --- /dev/null +++ b/live-build/variants/internal-hyperscale/ansible/playbook.yml @@ -0,0 +1,31 @@ +# +# Copyright 2025 Delphix +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +- hosts: all + gather_facts: no + vars: + ansible_python_interpreter: /usr/bin/python3 + roles: + - appliance-build.minimal-common + - appliance-build.minimal-internal + - appliance-build.minimal-development + - appliance-build.hyperscale-common + - appliance-build.masking-common + - appliance-build.masking-development + - appliance-build.virtualization-common + - appliance-build.virtualization-development + - appliance-build.qa-internal diff --git a/live-build/variants/internal-hyperscale/ansible/roles b/live-build/variants/internal-hyperscale/ansible/roles new file mode 120000 index 00000000..58b96301 --- /dev/null +++ b/live-build/variants/internal-hyperscale/ansible/roles @@ -0,0 +1 @@ +../../../misc/ansible-roles \ No newline at end of file diff --git a/scripts/build-ancillary-repository.sh b/scripts/build-ancillary-repository.sh index 4c033b55..04b83157 100755 --- a/scripts/build-ancillary-repository.sh +++ b/scripts/build-ancillary-repository.sh @@ -87,6 +87,8 @@ download_combined_packages_artifacts "$AWS_S3_URI_COMBINED_PACKAGES" \ download_dct_artifacts "$AWS_S3_URI_DCT_PACKAGES" "$WORK_DIRECTORY/artifacts" +download_hyperscale_artifacts "$AWS_S3_URI_HYPERSCALE_COMPLIANCE_PACKAGES" "$WORK_DIRECTORY/artifacts" + # # Create a delphix-build-info package from the build metadata of each # package and of appliance-build itself and store it along with the other diff --git a/scripts/common.sh b/scripts/common.sh index 7fb6507a..2cc75b92 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -150,6 +150,31 @@ function download_dct_artifacts() { popd &>/dev/null || exit 1 } +function download_hyperscale_artifacts() { + local hyperscale_artifacts_uri="$1" + local target_dir="$2" + + if [[ -z "$hyperscale_artifacts_uri" ]]; then + HYPERSCALE_S3_DIR="s3://snapshot-de-images" + HYPERSCALE_LATEST_PREFIX="builds/jenkins-masking/github/delphix/hyperscale-masking/build/appliance/develop/latest" + + aws s3 cp "$HYPERSCALE_S3_DIR/$HYPERSCALE_LATEST_PREFIX" . + + HYPERSCALE_PACKAGE_PREFIX=$(cat latest) + rm -f latest + + hyperscale_artifacts_uri="$HYPERSCALE_S3_DIR/$HYPERSCALE_PACKAGE_PREFIX" + fi + + mkdir "$target_dir/hyperscale" + pushd "$target_dir/hyperscale" &>/dev/null || exit 1 + + aws s3 sync "$hyperscale_artifacts_uri" . + sha256sum -c SHA256SUMS + + popd &>/dev/null || exit 1 +} + # # Find all .deb and .ddeb packages in source directory tree and move them # to target directory.