Questions tagged [jenkins-pipeline]

For questions specifically about Jenkins 2.0's pipeline architecture. This includes both declarative and scripted pipelines.

Filter by
Sorted by
Tagged with
0
votes
1answer
420 views

Jenkins “internal” pipeline script producing errors when running sh steps

I've been experimenting with creating a new pipeline, using the built-in pipeline editor (i.e. not from SCM). The strange bit is that, when I run any sh step, I receive the following error: sh: 1: ...
0
votes
2answers
3k views

How to use Jenkins Pipeline and choose triggers for email notifications?

Before Pipeline, I used Email-ext plugin to define triggers for sending emails (on first failure, and when back to success). But in the Pipeline version, I can't control the triggers, I can only "...
4
votes
1answer
6k views

How can I push multiple containers, created with docker-compose, to a registry

I am using Jenkins pipeline and run a shell command to bring up my linked containers for testing. Once the testing is complete, I want to push the containers to a registry (I would prefer AWS ERC, but ...
1
vote
3answers
7k views

How can I clean/delete a Jenkins workspace after merge?

I would like to keep a workspace in Jenkins until after the pull request is merged. Meaning, I don't want to clear the workspace after every build, but I also don't want to clear the workspace only ...
0
votes
1answer
198 views

Jenkins, Jenkins SSH Plug-In, EC2, “ubuntu” user and “www-data”

I am trying to install Jenkins to achieve a Github -> EC2 instance folder pipeline. So far everything works well when I target an empty folder... however, when I target my production folder owned by ...
8
votes
1answer
21k views

sshagent and jenkinsfile

I am new to Jenkinsfile. I have previously configured my Jenkins job from GUI, and we are now upgrading our server to use Jenkinsfile. My job contains a section which needs to SSH to another server. ...
1
vote
1answer
6k views

How set and get var with Path?

I write script for deploy files by ssh via Jenkins #!groovy node('superhost01'){ String HOSTNAME="host01" String USERNAME="tech_user" withEnv(['PATH=/data/jdbc_connector']) stage('...
0
votes
1answer
847 views

Using Jenkins to control docker image build flow

I'm trying to figure out the proper way to get build environments into a CI pipeline. What I want to achieve is: someone pushes to the docker source repo (not registry, a repo with the docker folder)...
6
votes
2answers
1k views

Jenkins managing a pool of servers across restarts

I have a pool of servers to test a provisioning process my team owns. One server is needed per branch or PR. The process requires reboots. Once the process is run, we run some tests. A Jenkins ...
6
votes
2answers
14k views

Is it possible to use a JenkinsFile in one repo to build and deploy a related repo?

Our team has two separate repositories for a frontend/backend system. They would like to have these two repositories deployed to the shared team environment together. My understanding of the ...
9
votes
1answer
6k views

How do I trigger scripts on a merge or when a branch is deleted?

I am using jenkins multibranch pipelines. If a branch is merged and deleted jenkins removes the branch from the pipeline as well. This is great, but I want to run a command/script when a branch is ...
4
votes
2answers
525 views

How to perform continuous Integration using Jenkins?

I've the basic idea about the Continuous Integration using Jenkins like- basic project setup, setting up source code management bit-bucket and build the project. I have done this so far and following ...
6
votes
2answers
5k views

PRs not automatically getting trigger in Jenkins github organization

We are using Github for source control and Jenkins for our builds. In Jenkins, we are using GitHub Organization Folder plugin along with Multibranch pipeline plugin. This causes the repository to ...
4
votes
1answer
582 views

How to stop VPN connection started from Jenkins?

I've just discovered this site and I would like to ask my first question. I have a pipeline project on Jenkins that basically do this: SVN update Build Deploy As the deploy target machine is on a ...
2
votes
1answer
74 views

What are best practices for running Pipeline tests into a CI framework?

According to this github repo it is possible to test the Jenkinsfile, but this is run by Jenkins and if there are issues it will not run. Should one run such unit test in another CI? What are best ...
2
votes
0answers
889 views

Duplicate Class Definition when calling library code [closed]

I've got a jenkinsfile which is breaking on a second call to a custom library step. These calls are made inside another custom library step. I'm not sure if this is something not supported or what. ...
2
votes
1answer
2k views

Disable a Jenkins pipeline on failure? Issue with a central deployment job

Consider a structure of X micro services and 2 environments; staging and production. Each of these micro services is represented by a separate git repository, when a merge to master happens on any of ...
2
votes
1answer
6k views

What is the best way to share maven repository using Docker build (dynamic) image with maven?

We have created a Docker build container to be run by Jenkins for Java based projects. We are using Maven for building our software. The problem we are facing is that, the builds are taking way to ...
5
votes
1answer
2k views

Jenkins Promote Build across different pipeline?

In my workplace, we are using a monolithic repo. It contains many project and micro services that run on different Jenkins pipeline. I know that using Promoted Build Plugin, we can promote build of ...
11
votes
1answer
7k views

Jenkins Pipeline job; proper quoting for slackSend step

This is probably 100% user error, but I can't get a pipeline job to use a variable as the channel name in a slackSend step. This uses both the Slack plugin and the Build User Vars Plugin. I'm trying ...
5
votes
3answers
3k views

Jenkins Pipeline downstream job; exit unless it hasn't run in the last x hours

Is there a way in Groovy directly or by integrating Jenkins plugins to have a downstream job complete only if it hasn't been run in the last X hours already? Let's say I have unit tests, when green, ...

1 2 3 4
5