diff --git a/Jenkinsfile b/Jenkinsfile index 20a47e3..8dfa68f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,9 +14,13 @@ pipeline { stage('Prepare Environment') { steps { - sh 'echo "ID=${PROBIT_ID}" > "${WORKSPACE}/.env"' - sh 'echo "SECRET=${PROBIT_SECRET}" >> "${WORKSPACE}/.env"' - sh 'echo "KEY=${PROBIT_KEY}" >> "${WORKSPACE}/.env"' + script { + def envContent = """ID=${PROBIT_ID} + SECRET=${PROBIT_SECRET} + KEY=${PROBIT_KEY} + """ + writeFile file: "${WORKSPACE}/.env", text: envContent + } } }