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

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?

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Cloud Platform Architect 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?

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

  • 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

  • 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

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

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

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

    Anyway let’s check your error.

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

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

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

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

  • Cloud Platform Architect 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.:


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

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

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

    SchedulerJenkinsConfig::SCHEDULER_JENKINS_CSRF_ENABLED => true too?

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

    yes

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

    Is it possible that Jenkins has CSRF turned off?

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

    no

  • 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. πŸ˜‰

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

    my config is set to => false though

  • 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

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

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

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

    ok, so the problem seems to be the crumbissuer

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

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

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

Welcome!

It looks like you're new here. Sign in or register to get started.