- job-template:
    project-type: pipeline
    description: '{job-description}'
    sandbox: true
    concurrent: true
    disabled: false
    dsl: |2-


      def image_sha = null
      def image_md5 = null
      def image_name = null
      def image_size = null
      def storage_path = '/home/jenkins/images'
      def node_name = "${{NODE_NAME}}"
      def DOWNLOAD_FLAG = true

      node(node_name) {{

      stage("Clean Workspace") {{
      step([$class: 'WsCleanup'])
      }}

      stage("Check already exist file") {{
      try {{
      def file_name = "${{IMAGE_URL}}".split('/').last()
      sh "[ -f ${{storage_path}}/${{file_name}} ]"
      echo "We have already downloaded the image ${{IMAGE_URL}} in ${{storage_path}}"
      DOWNLOAD_FLAG = false
      currentBuild.result = 'NOT_BUILT'
      }} catch (e) {{
      echo "We don't have an image, need to download"
      DOWNLOAD_FLAG = true
      }}
      }}

      stage("Download image") {{
      if (DOWNLOAD_FLAG) {{
      sh "wget --progress=dot:giga ${{IMAGE_URL}}"
      image_name = sh(returnStdout: true, script: "basename ${{IMAGE_URL}}").trim()
      image_size = sh(returnStdout: true, script: "stat --printf='%s' ${{image_name}}").trim()
      }} else {{
      echo "Skip due to DOWNLOAD_FLAG ins't true"
      }}

      }}

      stage("Calculate sha") {{
      if (DOWNLOAD_FLAG) {{
      image_sha = sh(returnStdout: true, script: "sha256sum ${{image_name}} | cut -d ' ' -f 1").trim()
      image_md5 = sh(returnStdout: true, script: "md5sum ${{image_name}} | cut -d ' ' -f 1").trim()
      }} else {{
      echo "Skip due to DOWNLOAD_FLAG ins't true"
      }}
      }}

      stage("Save in home") {{
      if (DOWNLOAD_FLAG) {{
      // sh "mv ${{image_name}} ${{image_name}}-${{image_md5}}"
      // sh "mv ${{image_name}}-${{image_md5}} ${{storage_path}}/"
      sh "mv ${{image_name}} ${{storage_path}}/"
      }} else {{
      echo "Skip due to DOWNLOAD_FLAG ins't true"
      }}
      }}

      stage("Create source file") {{
      if (DOWNLOAD_FLAG) {{
      sh """
      touch image_data.txt
      echo IMAGE_URL=${{IMAGE_URL}} >> image_data.txt
      echo IMAGE_SHA256=${{image_sha}} >> image_data.txt
      echo IMAGE_MD5=${{image_md5}} >> image_data.txt
      echo IMAGE_NAME=\$(basename ${{IMAGE_URL}}) >> image_data.txt
      echo IMAGE_PATH=${{storage_path}}/${{image_name}} >> image_data.txt
      echo IMAGE_DOWNLOADED=\$(date +%Y%m%d%H%M%S) >> image_data.txt
      """
      sh """
      touch image_data.json
      cat << EOM > image_data.json
      {{
      "IMAGE_URL": "${{IMAGE_URL}}",
      "IMAGE_SHA256": "${{image_sha}}",
      "IMAGE_MD5": "${{image_md5}}",
      "IMAGE_NAME": "\$(basename ${{IMAGE_URL}})",
      "IMAGE_PATH": "${{storage_path}}/${{image_name}}",
      "IMAGE_DOWNLOADED": "\$(date +%Y%m%d%H%M%S)"
      }}
      EOM
      """
      }} else {{
      echo "Skip due to DOWNLOAD_FLAG ins't true"
      }}

      }}

      stage("Save artifacts") {{
      if (DOWNLOAD_FLAG) {{
      archiveArtifacts allowEmptyArchive: false,
      artifacts: "image_data.*"
      }} else {{
      echo "Skip due to DOWNLOAD_FLAG ins't true"
      }}
      }}

      }}
    name: download-config-drive
    parameters:
    - string:
        default: ''
        description: ''
        name: IMAGE_URL
    - string:
        default: offline-deploy
        description: ''
        name: NODE_NAME

