What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

quick question: `setup:jenkins:generate` was removed in

UK5DS29L2
UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet
edited August 2019 in Help

quick question:
setup:jenkins:generate was removed in https://github.com/spryker/setup/compare/4.1.2...4.2.0 but that caused our jenkins to fail with atomic deployment since the release folder (which jenkins knew about few releases ago) doesn't exist anymore. How is jenkins updated now?

Comments

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi Jan,

    Those commands was not deleted, but deprecated. The only way to remove those commands is changing ConsoleDependencyProvider.

    What is your upgrade case?

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok, but the code says it was deprecated without replacement, so that means there's another way of seting up jenkins now, right?
    my guess it's about scheduler:setup from now on, but that doesn't seem to work

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    and @ULYHPR789 I see in spryker-shop/suite repo the consoledependencyprovider doesn't include jenkins commands anymore so in default implementation is has been removed, not ONLY deprecated

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    In shops, the deprecated plugins replaced with the new ones. And the new ones provides scheduler:* commands.

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Anyway let’s check your error.

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    It seems it is connected with CSRF protection. Check if you Jenkins has it turned on.

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    isn't that by-default-enabled security feature?

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    As far as I know it is turned off in official docker image.

    Anyway if you have it turned on in Jenkins, you should set the appropriate config parameter, e.g.:


  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    those are already configured in config/Shared/config_default-development.php

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    SchedulerJenkinsConfig::SCHEDULER_JENKINS_CSRF_ENABLED => true too?

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    yes

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Is it possible that Jenkins has CSRF turned off?

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    no

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    well if it did it would throw
    Exception: Cannot generate CSRF token. Please check that CSRF protection is enabled on Jenkins server. πŸ˜‰

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    my config is set to => false though

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    so just to confirm:
    jenkins has csrf disabled and it is set to
    SchedulerJenkinsConfig::SCHEDULER_JENKINS_CSRF_ENABLED => false in my config

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    ah, makes sense, it is disabled in config, but not in the process, let me see if I can restart it

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok, so the problem seems to be the crumbissuer

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    if I set crumbissuer to false, then scheduler:setup runs fine

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet