pipeline {
	agent {
		label 'windows'
	}
    stages {
        stage('Deploy') {
            steps {

                withCredentials([string(credentialsId: 'opm-token', variable: 'TOKEN')]) {
                    powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm build; opm install -f oint-1.30.0.ospx'
                    powershell encoding: 'UTF-8', script:'cd ./src/ru/OInt; opm push --token $ENV:TOKEN --channel stable --file oint-1.30.0.ospx; del oint-1.30.0.ospx'
                    powershell encoding: 'UTF-8', script:'cd ./src/ru/cli; opm build;'
                    powershell encoding: 'UTF-8', script:'cd ./src/ru/cli; opm push --token $ENV:TOKEN --channel stable --file oint-cli-1.30.0.ospx; del oint-cli-1.30.0.ospx'
                }
                    
            }
        }
    }
}
