#!/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: "m13591_otf_dev"],
        [$class: 'hudson.model.StringParameterDefinition', name: 'KUBE_CONFIG', defaultValue: "kubeConfig-dev"],
        [$class: 'hudson.model.StringParameterDefinition', name: 'TILLER_NAMESPACE', defaultValue: "com-att-ecomp-otf-dev"]
]]])


echo "Build branch: ${env.BRANCH_NAME}"

node("docker"){
	stage 'Checkout'
	checkout scm
	PHASES=PHASE.tokenize( '_' );
	echo "PHASES : " + PHASES


	ARTIFACT_ID="ric-test-head";
	VERSION="Camile.2.0";
	NAMESPACE="com.att.ecomp.otf"
	DOCKER_REGISTRY="dockercentral.it.att.com:5100"

  if( ENV.equalsIgnoreCase("dev") ){
    IMAGE_NAME=DOCKER_REGISTRY + "/" + NAMESPACE + ".dev" + "/" + 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.14.3-linux-amd64.tar.gz
					tar -xf helm-v2.14.3-linux-amd64.tar.gz
					rm helm-v2.14.3-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')]) {

								sh """
									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

									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


									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

								"""
							}
    	          	}

				}
			}
      	}

	}
}
