blastik I'm trying to achieve essentially the same thing essentially, and months ago came to learn of the new Djenkins.install.SetupWizard.adminInitialApiToken }}option. I'm on 2.289.1 and {{Djenkins.install.SetupWizard.adminInitialApiToken=<my-pre-determined-34-char-token> simply has never worked. The docs for this option indicate that it:
determines the behavior during the SetupWizard install phase concerning the API Token creation for the initial admin account.
So, it would seem for automated installs like ours which must disable the setup wizard, this option is innefectual, by design. No?
On Gitter, timja pointed me to the PR that introduced this feature by wfollonier, whose description seems to indicate this is by design:
No impact once an instance is configured.
I can't understand the usefulness of this feature for automated installs, which inherently will be setting `jenkins.install.runSetupWizard = false`.
Any advice? I tried it with and without running the setupwizard, and I've never been able to use the token to authenticate as my admin user in a new Jenkins instance.
as requested in https://github.com/jenkinsci/jenkins/pull/4027#issuecomment-534558658
I'm deploying a new Jenkins from scratch on a single host using Docker all on top of AWS. Its authentication mode is set to SAML (using Okta) and we configure it using JCasC (Configuration as code). The deployment strategy we decided is to deploy a new instance each time a configuration change is made. However, in order to give a good experience to our end users, we want to make 2 steps before swapping between old and new release:
Ideally we would like to add a fix token into JCasC file to be able to connect to the API once Jenkins the host has been configured.
jenkins saml