Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session problems with multiple remotes #185

Open
diegopasten opened this issue Dec 9, 2019 · 2 comments
Open

Session problems with multiple remotes #185

diegopasten opened this issue Dec 9, 2019 · 2 comments
Assignees

Comments

@diegopasten
Copy link

diegopasten commented Dec 9, 2019

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.

export ENONIC_CLI_REMOTE_URL="http://company.com:4848"
export ENONIC_CLI_REMOTE_USER="jenkins-deploy-user"
export ENONIC_CLI_REMOTE_PASS="MYSECRET"
export SANDBOX_NAME=app_build_test

enonic sandbox create $SANDBOX_NAME --version 7.1.2
enonic project sandbox $SANDBOX_NAME
enonic project build
enonic sandbox delete -f $SANDBOX_NAME
enonic app install --file build/libs/*.jar

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.

@alansemenov
Copy link
Member

@pmi What's the status of this one?

@pmi
Copy link
Member

pmi commented Apr 6, 2021

This is probably obsolete now because of #268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants