@Library("centreon-shared-library") _

pipeline {
  agent { label 'C++' }
    stages {
      stage('Release Collect') {
        input {
          message "what verion and release number the release should have ?"
          parameters {
            string(name: 'VERSION', defaultValue: '', description: 'Version to be released')
            string(name: 'RELEASE', defaultValue: '', description: 'Release number')
          }
        }
        steps {
          echo 'Releasing Centreon Collect'
          loadCommonScripts()
          withCredentials([string(credentialsId: 'download-token', variable: 'DOWNLOAD_TOKEN')]) {
            sh './ci/release/collect-release.sh "$DOWNLOAD_TOKEN"'
          }
        }
      }
    }
}
