3 # ============LICENSE_START=======================================================
4 # Copyright (C) 2019 The Nordix Foundation. All rights reserved.
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
26 # file to record k8s properties
27 export K8S_DEPLOYMENT_FILE="$WORKSPACE/k8s.properties"
28 /bin/rm -f "$K8S_DEPLOYMENT_FILE"
30 echo "Info : Generating k8s properties"
32 echo "Info : Setting STACK_TYPE and STACK_VERSION"
34 export STACK_TYPE="kubernetes"
35 export STACK_VERSION="$K8S_VERSION"
37 # record vars to properties file
38 echo "STACK_TYPE=$STACK_TYPE" >> "$K8S_DEPLOYMENT_FILE"
39 echo "DEPLOY_SCENARIO=k8-calico-nofeature" >> "$K8S_DEPLOYMENT_FILE"
40 echo "STACK_VERSION=$STACK_VERSION" >> "$K8S_DEPLOYMENT_FILE"
41 echo "NORDIX_STACK_VERSION=$K8S_VERSION" >> "$K8S_DEPLOYMENT_FILE"
44 export NORDIX_ARM_HTTPS_URL="https://artifactory.nordix.org/artifactory"
45 export ARTIFACT_ARM_FOLDER="release"
46 export BUILD_IDENTIFIER="${K8S_VERSION}/stack/latest"
47 export OFFLINE_INSTALLER_FILE="/tmp/${STACK_TYPE}-${K8S_VERSION}-${DISTRO}.bsx"
48 export BUILD_ARTIFACTS="/tmp/${STACK_TYPE}-${K8S_VERSION}-${DISTRO}.bsx"
49 export NORDIX_ARM_REPO="nordix-${STACK_TYPE}"
50 # looking to make url looking like
51 # https://artifactory.nordix.org/artifactory/nordix-kubernetes/oss/release/1.15/stack/latest/kubernetes-1.15-ubuntu1804.bsx
52 export NORDIX_ARTIFACT_URL="$NORDIX_ARM_HTTPS_URL/$NORDIX_ARM_REPO/oss/$ARTIFACT_ARM_FOLDER/$BUILD_IDENTIFIER"
54 cat << EOF >> "$K8S_DEPLOYMENT_FILE"
55 BUILD_IDENTIFIER=$BUILD_IDENTIFIER
56 BUILD_DATE=$(date '+%Y%m%d%H%M')
60 ENGINE_SHA=$(git rev-parse HEAD)
61 OFFLINE_INSTALLER_FILE=$OFFLINE_INSTALLER_FILE
62 BUILD_ARTIFACTS=$BUILD_ARTIFACTS
63 NORDIX_ARM_REPO=nordix-${STACK_TYPE}
64 NORDIX_ARTIFACT_URL=$NORDIX_ARTIFACT_URL
67 echo "Info : K8S properties"
68 echo "-------------------------------------------------------------------------"
69 cat "$K8S_DEPLOYMENT_FILE"
70 echo "-------------------------------------------------------------------------"
72 # vim: set ts=2 sw=2 expandtab: