blob: 2ee36aab1a846e292dbcde76441e5265b3f31bb7 [file] [log] [blame]
garciadeblas8d8cd992024-05-21 16:04:14 +02001#######################################################################################
2# Copyright ETSI Contributors and Others.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13# implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#######################################################################################
17
18set -e -o pipefail
19
20export HERE=$(dirname "$(readlink --canonicalize "$BASH_SOURCE")")
21source "${HERE}/library/functions.sh"
22source "${HERE}/library/trap.sh"
23
24
25# Input values
26export PROJECT_DIR="$1"
27export PROFILE_NAME="$2"
28
29# Reference folders
30export ADDON_CTRL_DIR="${PROJECT_DIR}/infra-controller-profiles/${PROFILE_NAME}"
31export ADDON_CONFIG_DIR="${PROJECT_DIR}/infra-config-profiles/${PROFILE_NAME}"
32
33# Add the CrossPlane controller
34PACKAGE="${SW_CATALOGS_REPO_DIR}/infra-controllers/crossplane/controller"
35cp "${PACKAGE}/templates"/* "${ADDON_CTRL_DIR}/"
36
37# Add the CrossPlane providers
38## Azure providers
39PACKAGE="${SW_CATALOGS_REPO_DIR}/infra-controllers/crossplane/providers/azure"
40cp "${PACKAGE}/templates"/* "${ADDON_CTRL_DIR}/"
41
42## GCP providers
43PACKAGE="${SW_CATALOGS_REPO_DIR}/infra-controllers/crossplane/providers/gcp"
44cp "${PACKAGE}/templates"/* "${ADDON_CTRL_DIR}/"
45
46## AWS providers
47PACKAGE="${SW_CATALOGS_REPO_DIR}/infra-controllers/crossplane/providers/aws"
48cp "${PACKAGE}/templates"/* "${ADDON_CTRL_DIR}/"
49
50# Add the Argo WorkFlows controller
51PACKAGE="${SW_CATALOGS_REPO_DIR}/infra-controllers/argo-workflows"
52cp "${PACKAGE}/templates"/* "${ADDON_CTRL_DIR}/"