#!/usr/bin/env groovy

/*  Copyright (c) 2019 AT&T Intellectual Property.                             #
#                                                                              #
#   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.                                             #
##############################################################################*/

properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [
        [$class: 'hudson.model.StringParameterDefinition', name: 'PHASE', defaultValue: "BUILD"],
        [$class: 'hudson.model.StringParameterDefinition', name: 'ENV', defaultValue: "dev"],
        [$class: 'hudson.model.StringParameterDefinition', name: 'MECHID', defaultValue: "id_otf_dev"],
        [$class: 'hudson.model.StringParameterDefinition', name: 'KUBE_CONFIG', defaultValue: "kubeConfig-dev"],
        [$class: 'hudson.model.StringParameterDefinition', name: 'TILLER_NAMESPACE', defaultValue: "org-oran-otf"]
]]])


echo "Build branch: ${env.BRANCH_NAME}"

node("docker"){
	stage 'Checkout'
	checkout scm
	PHASES=PHASE.tokenize( '_' );
	echo "PHASES : " + PHASES


	ARTIFACT_ID="otf-ssh-test-head";
	VERSION="Blitzcrank.1.1";
	NAMESPACE="org-oran-otf"
	DOCKER_REGISTRY="registry.hub.docker.io"

  if( ENV.equalsIgnoreCase("dev") ){
    IMAGE_NAME=DOCKER_REGISTRY + "/" + NAMESPACE + "/" + ARTIFACT_ID +  ":" + VERSION

  }
  if( ENV.equalsIgnoreCase("prod") || ENV.equalsIgnoreCase("prod-dr")){
    IMAGE_NAME=DOCKER_REGISTRY + "/" + NAMESPACE + ".prod" + "/" + ARTIFACT_ID +  ":" + VERSION

  }

  if( ENV.equalsIgnoreCase("st") ){
    IMAGE_NAME=DOCKER_REGISTRY + "/" + NAMESPACE + ".st" + "/" + ARTIFACT_ID +  ":" + VERSION

  }

	echo "Artifact: " + IMAGE_NAME

	withEnv(["PATH=${env.PATH}:${env.WORKSPACE}/linux-amd64", "HELM_HOME=${env.WORKSPACE}"]) {

		echo "PATH=${env.PATH}"
		echo "HELM_HOME=${env.HELM_HOME}"

		if (PHASES.contains("BUILD")){

			stage 'Publish Artifact'

				withCredentials([usernamePassword(credentialsId: MECHID, usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {

				echo "Artifact: " + IMAGE_NAME

				sh """
					docker login $DOCKER_REGISTRY --username $USERNAME --password $PASSWORD
					docker build -t $IMAGE_NAME .
					docker push $IMAGE_NAME
				"""
				}

		}

		if (PHASES.contains("DEPLOY") || PHASES.contains("UNDEPLOY")) {

			stage 'Init Helm'

			//check if helm exists if not install
			if(fileExists('linux-amd64/helm')){
				sh """
					echo "helm is already installed"
				"""
			}
			else{
			//download helm
				sh """
					echo "installing helm"
					wget  https://storage.googleapis.com/kubernetes-helm/helm-v2.8.2-linux-amd64.tar.gz
					tar -xf helm-v2.8.2-linux-amd64.tar.gz
					rm helm-v2.8.2-linux-amd64.tar.gz
				"""
			}

			withCredentials([file(credentialsId: KUBE_CONFIG, variable: 'KUBECONFIG')]) {

				dir('helm'){
			    	//check if charts are valid, and then perform dry run, if successful then upgrade/install charts

  					if (PHASES.contains("UNDEPLOY") ) {
						stage 'Undeploy'

  						sh """
  							helm delete --tiller-namespace=$TILLER_NAMESPACE --purge $ARTIFACT_ID
  						"""
  					}

			    	//NOTE Double quotes are used below to access groovy variables like artifact_id and tiller_namespace
    	          	if (PHASES.contains("DEPLOY") ){
    	          		stage 'Deploy'
							withCredentials([
								usernamePassword(credentialsId: MECHID, usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD'),
								file(credentialsId: 'id_PRIVATE_KEY', variable: 'VAR_id_PRIVATE_KEY'),
								string(credentialsId: 'id_otf_key_passphrase', variable: 'VAR_id_otf_key_passphrase')
							]) {

								sh """
									
									cp $VAR_id_PRIVATE_KEY $ARTIFACT_ID
                          			FILE_id_PRIVATE_KEY=`basename $VAR_id_PRIVATE_KEY`

									echo "Validate Yaml"
									helm lint $ARTIFACT_ID

									echo "View Helm Templates"
									helm template $ARTIFACT_ID --set appName=$ARTIFACT_ID \
									--set appName=$ARTIFACT_ID \
									--set version=$VERSION  \
									--set env=$ENV \
									--set image=$IMAGE_NAME \
									--set namespace=$TILLER_NAMESPACE \
		                            --set Secret.id_private_key=\$FILE_id_PRIVATE_KEY \
                                    --set Secret.id_private_key_passphrase=$VAR_id_otf_key_passphrase \



									echo "Perform Dry Run Of Install"
									helm upgrade --tiller-namespace=$TILLER_NAMESPACE --install --dry-run $ARTIFACT_ID $ARTIFACT_ID \
									--set appName=$ARTIFACT_ID \
									--set version=$VERSION  \
									--set env=$ENV \
									--set image=$IMAGE_NAME \
									--set namespace=$TILLER_NAMESPACE \
		                            --set Secret.id_private_key=\$FILE_id_PRIVATE_KEY \
                                    --set Secret.id_private_key_passphrase=$VAR_id_otf_key_passphrase \


									echo "Helm Install/Upgrade"
					    			helm upgrade --tiller-namespace=$TILLER_NAMESPACE --install $ARTIFACT_ID $ARTIFACT_ID \
									--set appName=$ARTIFACT_ID \
									--set version=$VERSION  \
									--set env=$ENV \
									--set image=$IMAGE_NAME \
									--set namespace=$TILLER_NAMESPACE \
		                            --set Secret.id_private_key=\$FILE_id_PRIVATE_KEY \
                                    --set Secret.id_private_key_passphrase=$VAR_id_otf_key_passphrase \

								"""
							}
    	          	}

				}
			}
      	}

	}
}
