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

💣 Bug: jenkins-plugin failed #1008

Closed
IronCore864 opened this issue Aug 18, 2022 · 2 comments · Fixed by #1010
Closed

💣 Bug: jenkins-plugin failed #1008

IronCore864 opened this issue Aug 18, 2022 · 2 comments · Fixed by #1010
Assignees
Labels
bug Something isn't working

Comments

@IronCore864
Copy link
Member

What Happened?

tools file:

tools:
  - name: jenkins
    instanceID: default
    options:
      test_env: true
      create_namespace: true
      repo:
        name: jenkins
        url: https://charts.jenkins.io
      chart:
        chart_name: jenkins/jenkins
        release_name: jenkins
        namespace: jenkins
        wait: true
        timeout: 10m
        upgradeCRDs: true
        values_yaml: |
          persistence:
            storageClass: jenkins-pv
          serviceAccount:
            create: false
            name: jenkins
          controller:
            serviceType: NodePort
            nodePort: 32000
            additionalPlugins:
              # install "GitHub Pull Request Builder" plugin, see https://plugins.jenkins.io/ghprb/ for more details
              - ghprb
              # https://plugins.jenkins.io/gitlab-plugin/
              - gitlab-plugin
              - antisamy-markup-formatter
            # Enable HTML parsing using OWASP Markup Formatter Plugin (antisamy-markup-formatter), useful with ghprb plugin.
            enableRawHtmlMarkupFormatter: true
            # Jenkins Configuraction as Code, refer to https://plugins.jenkins.io/configuration-as-code/ for more details
            # notice: All configuration files that are discovered MUST be supplementary. They cannot overwrite each other's configuration values. This creates a conflict and raises a ConfiguratorException.
            JCasC:
              defaultConfig: true
              # each key-value in configScripts will be added to the ${JENKINS_HOME}/casc_configs/ directory as a file.
              configScripts:
                # this will create a file named "safe_html.yaml" in the ${JENKINS_HOME}/casc_configs/ directory.
                # it is used to configure the "Safe HTML" plugin.
                # filename must meet RFC 1123, see https://tools.ietf.org/html/rfc1123 for more details

Errors:

2022/08/18 13:41:59 release installed successfully: jenkins/jenkins-4.1.17
2022-08-18 13:41:59 ℹ [INFO]  Here is how to get the password of the admin user:
2022-08-18 13:41:59 ℹ [INFO]  kubectl exec --namespace jenkins -it svc/jenkins-jenkins -c jenkins -- /bin/cat /run/secrets/additional/chart-admin-password && echo
2022-08-18 13:41:59 ℹ [INFO]  You are in test env. Here are the Jenkins url in host machine and Jenkins url in K8s cluster.
2022-08-18 13:41:59 !! [ERROR]  Failed to get jenkins url: exit status 1
2022/08/18 13:42:00 WARNING: repository name "jenkins" already exists
2022-08-18 13:42:00 ℹ [INFO]  Uninstalling jenkins helm chart.
2022/08/18 13:42:00 uninstall: Deleting jenkins
2022/08/18 13:42:01 Starting delete for "jenkins" Service
2022/08/18 13:42:01 Starting delete for "jenkins-agent" Service
2022/08/18 13:42:01 Starting delete for "jenkins" StatefulSet
2022/08/18 13:42:01 Starting delete for "jenkins-watch-configmaps" RoleBinding
2022/08/18 13:42:01 Starting delete for "jenkins-schedule-agents" RoleBinding
2022/08/18 13:42:01 Starting delete for "jenkins-casc-reload" Role
2022/08/18 13:42:01 Starting delete for "jenkins-schedule-agents" Role
2022/08/18 13:42:01 Starting delete for "jenkins" PersistentVolumeClaim
2022/08/18 13:42:01 Starting delete for "jenkins-jenkins-jcasc-config" ConfigMap
2022/08/18 13:42:01 Starting delete for "jenkins" ConfigMap
2022/08/18 13:42:01 Starting delete for "jenkins" Secret
2022/08/18 13:42:01 purge requested for jenkins
2022/08/18 13:42:01 release uninstalled, response: &{0x1400048b7a0 }
2022-08-18 13:42:01 ℹ [INFO]  -------------------- [  Processing aborted.  ] --------------------
2022-08-18 13:42:01 !! [ERROR]  Errors Map: key(jenkins/default-Create) -> value(Failed to get jenkins url: exit status 1)
2022-08-18 13:42:01 !! [ERROR]  Apply failed => some error(s) occurred during plugins apply process.

How to Reproduce?

No response

Anything else

No response

DevStream Version

latest

@IronCore864 IronCore864 added the bug Something isn't working label Aug 18, 2022
@IronCore864
Copy link
Member Author

Seems to be related to the func "getJenkinsURL" in internal/pkg/plugin/jenkins/prompt.go

@aFlyBird0
Copy link
Member

image

image

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants