From 10b0282ea299af537837b449d3fd364832539837 Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Wed, 1 Nov 2023 09:32:05 +0100 Subject: [PATCH] Provisioning: Mount Vcpkg Cache Drive on Linux Change-Id: Ib7345f622e05248aa0a61e44a4d079666e56ae7d Reviewed-by: Alexey Edelev --- .../common/linux/mount-vcpkg-cache-drive.sh | 21 +++++++++++++++++++ .../05-mount-vcpkg-cache-drive.sh | 8 +++++++ .../05-mount-vcpkg-cache-drive.sh | 8 +++++++ .../05-mount-vcpkg-cache-drive.sh | 8 +++++++ .../03-mount-vcpkg-cache-drive.sh | 8 +++++++ .../03-mount-vcpkg-cache-drive.sh | 8 +++++++ .../05-mount-vcpkg-cache-drive.sh | 8 +++++++ 7 files changed, 69 insertions(+) create mode 100755 coin/provisioning/common/linux/mount-vcpkg-cache-drive.sh create mode 100755 coin/provisioning/qtci-linux-RHEL-8.8-x86_64/05-mount-vcpkg-cache-drive.sh create mode 100755 coin/provisioning/qtci-linux-RHEL-9.0-x86_64/05-mount-vcpkg-cache-drive.sh create mode 100755 coin/provisioning/qtci-linux-RHEL-9.2-x86_64/05-mount-vcpkg-cache-drive.sh create mode 100755 coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/03-mount-vcpkg-cache-drive.sh create mode 100755 coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/03-mount-vcpkg-cache-drive.sh create mode 100755 coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/05-mount-vcpkg-cache-drive.sh diff --git a/coin/provisioning/common/linux/mount-vcpkg-cache-drive.sh b/coin/provisioning/common/linux/mount-vcpkg-cache-drive.sh new file mode 100755 index 00000000..6a3a5211 --- /dev/null +++ b/coin/provisioning/common/linux/mount-vcpkg-cache-drive.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -e + +targetDir="$HOME/vcpkg-cache" + +# Specify the path to the credential file +credentialsFile="$HOME/samba_credentials" + +sudo mkdir -p "$targetDir" + +# Mount the SMB share +# Check if the mount was successful +if sudo mount -t cifs //vcpkg-server.ci.qt.io/vcpkg "$targetDir" -o credentials="$credentialsFile",uid="$(id -u)",gid="$(id -g)" +then + echo "SMB share mounted successfully!" +else + echo "Failed to mount SMB share." +fi diff --git a/coin/provisioning/qtci-linux-RHEL-8.8-x86_64/05-mount-vcpkg-cache-drive.sh b/coin/provisioning/qtci-linux-RHEL-8.8-x86_64/05-mount-vcpkg-cache-drive.sh new file mode 100755 index 00000000..a6cca092 --- /dev/null +++ b/coin/provisioning/qtci-linux-RHEL-8.8-x86_64/05-mount-vcpkg-cache-drive.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# shellcheck source=../common/unix/mount-vcpkg-cache-drive.sh +source "${BASH_SOURCE%/*}/../common/linux/mount-vcpkg-cache-drive.sh" diff --git a/coin/provisioning/qtci-linux-RHEL-9.0-x86_64/05-mount-vcpkg-cache-drive.sh b/coin/provisioning/qtci-linux-RHEL-9.0-x86_64/05-mount-vcpkg-cache-drive.sh new file mode 100755 index 00000000..a6cca092 --- /dev/null +++ b/coin/provisioning/qtci-linux-RHEL-9.0-x86_64/05-mount-vcpkg-cache-drive.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# shellcheck source=../common/unix/mount-vcpkg-cache-drive.sh +source "${BASH_SOURCE%/*}/../common/linux/mount-vcpkg-cache-drive.sh" diff --git a/coin/provisioning/qtci-linux-RHEL-9.2-x86_64/05-mount-vcpkg-cache-drive.sh b/coin/provisioning/qtci-linux-RHEL-9.2-x86_64/05-mount-vcpkg-cache-drive.sh new file mode 100755 index 00000000..a6cca092 --- /dev/null +++ b/coin/provisioning/qtci-linux-RHEL-9.2-x86_64/05-mount-vcpkg-cache-drive.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# shellcheck source=../common/unix/mount-vcpkg-cache-drive.sh +source "${BASH_SOURCE%/*}/../common/linux/mount-vcpkg-cache-drive.sh" diff --git a/coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/03-mount-vcpkg-cache-drive.sh b/coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/03-mount-vcpkg-cache-drive.sh new file mode 100755 index 00000000..a6cca092 --- /dev/null +++ b/coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/03-mount-vcpkg-cache-drive.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# shellcheck source=../common/unix/mount-vcpkg-cache-drive.sh +source "${BASH_SOURCE%/*}/../common/linux/mount-vcpkg-cache-drive.sh" diff --git a/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/03-mount-vcpkg-cache-drive.sh b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/03-mount-vcpkg-cache-drive.sh new file mode 100755 index 00000000..ed49b3a5 --- /dev/null +++ b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/03-mount-vcpkg-cache-drive.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# shellcheck source=../common/linux/mount-vcpkg-cache-drive.sh +source "${BASH_SOURCE%/*}/../common/linux/mount-vcpkg-cache-drive.sh" diff --git a/coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/05-mount-vcpkg-cache-drive.sh b/coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/05-mount-vcpkg-cache-drive.sh new file mode 100755 index 00000000..ed49b3a5 --- /dev/null +++ b/coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/05-mount-vcpkg-cache-drive.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# shellcheck source=../common/linux/mount-vcpkg-cache-drive.sh +source "${BASH_SOURCE%/*}/../common/linux/mount-vcpkg-cache-drive.sh"