I have two build jobs in Jenkins.
Build-test and build-prod, these create a sandbox and then creates an XP app from the same git repo.
I want to build and deploy directly from each job.
If I start with test it works fine, but then prod will fail as it seems to use the same session token. And its of course reverse If I delete all sandboxes and start with prod first instead of test.
I've also tried to include deletion of sandboxes in the job after build. But it still fails. If I go in the terminal and manually delete all sandboxes then again the first job I run will work perfectly fine, which is probably the weirdest problem here.
And at the end of the job I get this (when it fails)
BUILD SUCCESSFUL in 43s
6 actionable tasks: 1 executed, 5 up-to-date
+ enonic app install --file build/libs/company-app-0.0.1-SNAPSHOT.jar
Installing. Session is no longer valid.
Installing...415 Cannot consume content type
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Note that I use CLI as binary in the Jenkins instance, not as the ci-image supplied. This is because that image does not yet support YARN/NPM. My guess is that is solved automatically in a container system.
I have two build jobs in Jenkins. Build-test and build-prod, these create a sandbox and then creates an XP app from the same git repo. I want to build and deploy directly from each job.
If I start with test it works fine, but then prod will fail as it seems to use the same session token. And its of course reverse If I delete all sandboxes and start with prod first instead of test.
I've also tried to include deletion of sandboxes in the job after build. But it still fails. If I go in the terminal and manually delete all sandboxes then again the first job I run will work perfectly fine, which is probably the weirdest problem here.
At the moment Jenkins does it this way.
And at the end of the job I get this (when it fails)
Note that I use CLI as binary in the Jenkins instance, not as the ci-image supplied. This is because that image does not yet support YARN/NPM. My guess is that is solved automatically in a container system.