5

Yes, storing your ssh keys directly on a build node is a bad practice. Nodes can be replicated, deleted, or given access to from other systems, and you don't want to lose track of what systems have access to your secrets. You should also not pass them directly into the build job, either as a parameter or as an environment variable. This can cause a huge ...


3

It seems to be an issue with Tomcat URL you are using. Either you are using "HTTP" in deployment when server is expecting HTTPS or vice versa. hudson.model.Executor.run(Executor.java:428) Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? Have a look at this answer unrecognized-ssl-message-plaintext-connection-...


3

You have to extend the jenkins/jenkins:lts to install the Docker client: FROM jenkins/jenkins:lts # Switch to root USER root ENV DOCKER_VERSION docker-18.06.3-ce ARG DOCKER_GID=993 # put the correct docker gid # Download and install docker client RUN wget --quiet -O- \ https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}.tgz | \...


3

Simple one. You should either add ansible_ssh_extra_args="-o StrictHostKeyChecking=no" to inventory or disableHostKeyChecking: true into Jenkins pipeline script (inside ansiblePlaybook block). Like this: ansiblePlaybook( colorized: true, installation: 'ansible27' inventory: '[hostsfile]' playbook: '[playbook]' disableHostKeyChecking: true )


2

Any CI/CD plugin can ultimately be scripted. However, using plugins gives you better centralized control. Consider the following scenario: Your SonarQube server location has to move to a new location. If you are using a script like the example you provided above, you would need to manually update every script. This process is error prone as you may ...


2

You don't need any plugins. You can send an e-mail from your Pipeline using the mail() step. You can respond to the input step by using the REST API as documented in this answer on Stack Overflow. Put the two together and you should be able to craft an e-mail that contains buttons for responding to the input.


2

Solutions: You have a few choices to resolve the security issue in git client plugin 3.0.0-rc. 1) Install git plugin 3.12.1 and git client plugin 2.8.5 from the Jenkins update center 2) Upload git plugin 3.12.1 and git client plugin 2.8.6 into your Jenkins server from the "Advanced" tab of the "Manage Plugins" page inside "Manage Jenkins". 3)Install git ...


2

I can only speak from personal experience rather than best practices, but in our company we'll make a duplicate jenkins instance, then upgrade that. We do main upgrade first, then plugins second, then run testing to make sure our core jobs still work. If all is good, we'll then upgrade the real jenkins during off-hours. We have 90+ jobs so testing them all ...


2

The plugin that you are looking for is: https://github.com/jenkinsci/github-plugin. You need to go in Manage Jenkins > Global Configuration to find the GitHub plugin configuration (according the documentation).


1

You can try 3 different things- Try pinging https://updates.jenkins-ci.org/download/plugins/ and see if it gets any response. If it doesn't respond then make sure your internet is working fine. You can try installing the plugins by connecting to a VPN. Lastly, you can reinstall Jenkins to see if the error persists.


1

You can't add run-time dependencies on an already build image using a yaml manifest. You might attach/exec to an already running pod and install them, but it makes no sence, since you need to make sure that when the pod is re-created you do it again. The much better and right way is simply to describe it in your Dockerfile. Kubernetes is not created for ...


1

EDIT: Updating my answer to include steps on using the Declarative Directive Generator. You can experiment with the different available configuration options, and sometimes gets hints as to what certain settings provide. For this specific case: Navigate to <$JENKINS_URL>/directive-generator/ Select parameters: Parameters from the Sample Directive ...


1

I believe that the problem lies on your proxy environment variables. $ docker run \ --name myjenkins \ -p 7000:8080 \ -p 50000:50000 \ --env HTTP_PROXY="http:// localhost:8080" \ --env HTTPS_PROXY="https:// localhost:8080" \ -v /var/jenkins_home \ jenkins The values of $HTTP_PROXY and $HTTP_PROXY are not supposed to have space ...


1

Use the result property of object returned from the build step. This was already asked and has an answer over on StackOverflow. Additionally, this is hinted at in the official build step documentation in the description for the propagate parameter ("use the result property of the return value as needed"). I haven't tested it as I don't have a test Jenkins ...


1

Check out Config as Code for installing plugins. If you're using the jenkins image, just use an older version of the image that has the proper plugin version


1

As far as I can tell, there is no native functionality in Active Choice Parameters to load the Active Choice code from SCM. There are a couple ways to build this functionality yourself, however they're both clunky solutions that can be difficult to debug. (Unfortunately I can't copy any example code from my work right now because I'm at home on my personal ...


1

The issue was with one of the options present in global security configuration “ Enable script security for job DSL scripts”, which needs to be unchecked.


1

I don't know of any current plugins for doing this. That may because a lot of backup functionality is built into MSSQL. The easiest way to automate a backup via Jenkins may be to use a command line script to use a sql command: Sqlcmd -E -S touch -Q" BACKUP DATABASE [DBName] TO DISK = 'C:\artifact_directory\my_db_backup.BAK' You could also also avoid ...


1

Not to take away from @vaporwave_sailor or @Alex, answers, but to add to.. The basic answer is you MUST upgrade the war first, then the plugins. All plugins depend on a minimum Jenkins version and the Update Centre will give you different information back. If you don't upgrade often, use the LTS version. READ the Upgrade Guide. READ the Changelog. Re-READ ...


1

I've gained some experience from f-n up Jenkins a lot of times, here is order I kept sticking to and it saved me a lot of time: Upgrade Jenkins itself (if needed) Upgrade Auth plugins (i.e. Github org auth) Upgrade plugins related to most important pipelines/projects (ssh-agents, ansible, k8s, docker, whatever you guys are using) Upgrade currently used but ...


1

Create and add token to be able to connect to SonarQube. You have create project in SonarQube and use it as a parameter: sh """ ${scannerHome}/bin/sonar-scanner \ -Dsonar.projectKey=your_project_key_created_in_sonarqube_as_project \ -Dsonar.sources=. \ """ Copied from [StackOverflow] Problem with Connecting Jenkins to SonarQube.


1

Got the solution : in the inventory file (/etc/ansible/hosts) : [host] 192.XXX.XXX.XXX ansible_user=ubuntu1(target hostname) ansible_become_password=XXXXXXXX(target pwd) and in the play we have to set - hosts: host become: yes tasks: -name : Update XYZ app script: update.py I have already written a python script for my process so I have ...


1

EDIT: It might have a chance for me to misread your question at the first time, so let me add another one. If you meant by Jenkinsfile as you have a manual parameter input in Jenkinsfile for Multibranch or Github Org pipeline, then probably bad idea. Those kind of jobs should run with predefined parameters or take them on-the-fly like manipulating some ...


1

The default behavior of Jenkins is to use the same node over and over unless it's unavailable. If you use labels you can target resources. Take a look at plugins like Least Load and Scoring Load Balancer to help distribute the load. CloudBees also provides an Even Scheduler plugin as a commercial offering. Kubernetes (e.g. Kubernetes Plugin) to schedule ...


1

I find it strange that nobody mentioned the Configuration as Code plugin. Our solution to this problem is to maintain a base Docker image for jenkins, provisioned with two config files: jenkins.yml plugins.txt The plugins are installed by the install-plugins.sh script provided by the base Jenkins image: COPY casc_configs/plugins.txt /usr/share/jenkins/ref/...


Only top voted, non community-wiki answers of a minimum length are eligible