jx: jx edit env - fails with error: secrets "jenkins" not found
Summary
jx edit env
command fails with error: creating Jenkins client: secrets “jenkins” not found
Steps to reproduce the behavior
- Install Jenkins X with
jx boot
- Run the command
jx edit env staging
- Select:
Promotion Strategy: Manual
Expected behavior
The promotion strategy for the staging environment was changed to Manual
.
Actual behavior
? Label: Staging
? Namespace: jx-********-staging
? Domain: ********.com
? Environment in separate cluster to Dev Environment: No
? Promotion Strategy: Manual
? Git URL for the Environment source code: https://github.com/********/environment-********-staging.git
? Git branch for the Environment source code: master
Updated environment staging
? Do you wish to use ******** as the user name to create the Git repository Yes
error: creating Jenkins client: secrets "jenkins" not found
Jx version
The output of jx version
is:
NAME VERSION
jx 2.0.1192
Kubernetes cluster v1.15.6
kubectl v1.17.2
helm client Client: v2.16.1+gbbdfe5e
git 2.25.0
Operating System Mac OS X 10.15.3 build 19D76
verifying packages
jx-requirements.yml
version stream:
versionStream:
ref: v1.0.347
url: https://github.com/jenkins-x/jenkins-x-versions.git
Jenkins type
- Serverless Jenkins X Pipelines (Tekton + Prow)
- Classic Jenkins
Kubernetes cluster
Self-created with kubespray
Operating system / Environment
Running the CLI on my MacBook Pro (OS X)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 20 (8 by maintainers)
Same issue for me. First, the secret issue then
unable to find external URL of service jenkins in namespace jx
I’ve solved it following this gist:
GKE: https://gist.github.com/vfarcic/fe18870a015f4acc34d91c106d0d43c8 EKS: https://gist.github.com/vfarcic/f4a1df244d1852ee250e751c7191f5bd AKS: https://gist.github.com/vfarcic/b07f45f6907c2a1c71f45dbe0df8d410 Serverless: https://gist.github.com/vfarcic/7b3b3d90ecd7f343effe4fff5241d037
It is from a great book: The DevOps toolkit series: The Devops 2-6 toolkit - Jenkins X Cloud-Native Kubernetes-First Continous Delivery
/assign ankitm123
Just took a quick look, and it appears
jx edit env
andjx create env
are still calling a legacyImportProject
function that tries to import a Jenkins multi-branch project. I…have no idea why that’s the case.I’m experiencing the exact same issue. I’m probably created/destroyed about 20 jx GKE clusters (via the jx cli) over the past few weeks and have never seen a
jenkins
secret in thejx
namespace.Environment setup below.
@abayer Would you happen to know whether there is any way to properly create a jenkins secret from scratch if its missing? Alternatively, if you have an example yaml manifest for the secret available, and the secret info itself is simply the standard jx base64 encoded creds, then those of us with running jx environments could at least add a hotfix to our provisioning scripts.
No, it doesn’t exist. And also I’ve checked previous installations for Serverless Jenkins X by
jx install
and there is nojenkins
secret in any of them.