Closed sgokaram-saagie closed 4 years ago
Release fixe : 2.0.9
Need validation for this issue @sgokaram-saagie
How to test :
Version to test : 2.0.22
The Export phase:
Create a build file:
Example of build.projectsExportV1.gradle
:
plugins {
id "io.saagie.gradle-saagie-dataops-plugin" version "2.0.22"
}
saagie {
server {
url = "REPLACE_SAAGIEURL"
login = "REPLACE_SAAGIELOGIN"
password = "REPLACE_SAAGIEPASSWORD"
environment = "REPLACE_SAAGIE"
jwt = true
}
job {
ids = [ "21754" ]
}
exportArtifacts {
export_file = "./job/export.zip" // <=== url "./job/" should exist
overwrite=true
temporary_directory='./tmp' // <=== temporary_directory ./tmp' should exist
}
}
Export job using this commande :
The command line : gradle -b build.projectsExportV1.gradle projectsExportV1
The import phase:
Create a new build file: Example : build.projectsImport.gradle:
plugins {
id 'groovy'
id 'io.saagie.gradle-saagie-dataops-plugin' version '2.0.22'
}
saagie {
server {
url = "REPLACE_SAAGIEURL"
login = "REPLACE_SAAGIELOGIN"
password = "REPLACE_SAAGIEPASSWORD"
environment = "REPLACE_SAAGIE"
jwt = true
acceptSelfSigned = true
}
project {
id = "REPLACE_SAAGIE_PROJECT_ID"
}
importArtifacts {
import_file = "./job/export.zip"
temporary_directory='./tmp'
}
}
Then use this command line:
The command line : gradle -b build.projectsImport.gradle projectsImport
Bug behvior
You should get
Task :projectsImport FAILED
Something went wrong when creating project job: {"errors":[{"message":"Job not valid","extensions":{"commandLine":"not allowed","package":"not allowed","classification":"ValidationError"}}],"data":null}
Expected behvior
> Task :projectsImport
{status=success, job=[{id=21754, name=RetrieveCustomerData}], pipeline=[]}
BUILD SUCCESSFUL in 5s
1 actionable task: 1 executed
Unable to import the Java/Scala Job. Export works fine. Job id is 21754
shivakumar@saagies-mbp Gradle % gradle -b build.gradle.projectExportJobV1 projectExportV1
BUILD SUCCESSFUL in 19s 1 actionable task: 1 executed shivakumar@saagies-mbp Gradle % gradle -b build.gradle.projectImportJob projectImport
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':projectsImport'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 5s 1 actionable task: 1 executed
plugins { id "io.saagie.gradle-saagie-dataops-plugin" version "2.0.8" }
saagie { server { url = saagieurl login = saagieuserid password = saagiepassword environment = saagieplatformid jwt = true } job { ids = [ "21754" ] } exportArtifacts { export_file = "./job/export.zip" overwrite=true temporary_directory='./tmp' } }