4

I believe it is now possible to configure the webhook on per-repo basis: https://mohamicorp.atlassian.net/wiki/spaces/DOC/pages/381419546/Configuring+Webhook+To+Jenkins+for+Bitbucket+Bitbucket+Branch+Source+Plugin


3

I figured it out by myself, there is no plugin needed. build.sh &> /dev/stdout | tee jenkins.txt and then curl -F file=@jenkins.txt -F channels=yourchannel -H "Authorization: Bearer your token" https://slack.com/api/files.upload There is no '#' needed for slack channel and channel should not be private. And if you use buils.sh | tee jenkins.log ...


3

The JUNIT plugin has a built-in publisher for aggregating test results called "Aggregate Downstream Test Results". You need to make sure that the 'parent' and 'child' jobs are linked together with a downstream/upstream relation. This is usually done by archiving an artifact in the parent build and copying it to the children builds using the 'Archive Artifact'...


2

Jenkins slave runs in unix system services of z/OS and can run any script or function from there. We use the Git plugin to pull the source code onto z/OS then you have different choices of how to work with it. You can use IBM Dependency Based Build which is Groovy ported to z/OS plus some extensions to specifically work with native z/OS functions such as ...


2

I think your issue is rooted in the server variable not being reusable outside the pre-build stage block. In Jenkins declarative, you can define variables like that using the script { ... } block, but once you leave the stage those variables are inaccessible to other to stages. With the previous suggestions, I'd recommend this: House the artifactory ...


2

Have a look at the Summary Display plugin. Some more details about it (= quote from the linked page): ... allows an easy and fully customized build report display. Features Allow a rich summary report visible from both project and build page Reports must be written in an XML format according to the syntax described in section Syntax ...


2

I assume you would like to run locally to test logic? If so there is a unit testing framework for Jenkins declarative / scripted pipeline. I have not personally used it but this would enable me to test stubbed logic locally. Alternatively, as you're no ta fan of GUIs you could have a look at Jenkins X which has a very powerful CLI and is more gitops driven.


1

If you know what plugins are causing the issue, you can use the Jenkins CLI to remove or downgrade those plugins. For instance: java -jar jenkins-cli.jar -s http://localhost:8080/ install-plugin SOURCE ... [-deploy] [-name VAL] [-restart] Installs a plugin either from a file, an URL, or from update center. SOURCE : If this points to a local file, ...


1

No, Jenkins file is not created at execution. Actually Jenkins file is a suite of all steps or activity which you want to build as a job or a groovy code. Jenkins file come from code repository, if you added file in your project. Below is a Jenkins file example: pipeline { agent any stages { stage('Build') { steps { ...


1

Based on this PR, the repoSlug was added and now the status is sent to the right repository. When it was not working: post { success { bitbucketStatusNotify( buildState: 'SUCCESSFUL', commitId: env.GIT_COMMIT ) } failure { bitbucketStatusNotify( ...


1

Do you use grafana for the dashboard? If so, you can customize with the prometheus plugin for Jenkins See also: https://piotrminkowski.wordpress.com/2017/08/29/visualizing-jenkins-pipeline-results-in-grafana/


1

Use a docker image within your pipeline that has helm and other tools installed. To quote the docs: Pipeline is designed to easily use Docker images as the execution environment for a single Stage or the entire Pipeline. Meaning that a user can define the tools required for their Pipeline, without having to manually configure agents. Practically ...


1

To restart Jenkins manually, you can use either of the following commands (by entering their URL in a browser): (jenkins_url)/safeRestart - Allows all running jobs to complete. New jobs will remain in the queue to run after the restart is complete. (jenkins_url)/restart - Forces a restart without waiting for builds to complete.


1

As @Harith mentioned, the use of secrets simplifies deployments in various environments using environmental variables. To load in a secret directly use: $ kubectl create secret generic < NAME OF SECRET > --from-literal=< KEY >=abc123!:? NOTE! This will put the secret in the Default namespace, add a namespace flag for specific resources e.g.: $ ...


1

Posting the full stack trace tends to clog up the channel. Here are a few things you can do: Send build status along with the Jenkins Job link to the Channel so Devs can come back to the link for debugging Send stack trace as a file Send build status as and link to channel and Stack trace info to the user who committed the code for build Either way, Post ...


1

You probably want the console output to be posted as an attachment, not a message, to slack. The post to slack plugin might be what you are looking for. The other thing you could do is create a part of the freestyle job that strips out what you want to a text file, and add that as part of the slack message attachment, in the slack plugin configuration.


1

I'm new to Azure DevOps so I may be wrong - I think you are asking about using a Jenkins plugin to scan Azure Repos for Jenkinsfiles. If you were moving to Azure DevOps, you can store your Azure Pipeline configuration, azure-pipelines.yml, in YAML format and this can be stored in the code repository (like a Jenkinsfile). For further pipeline details see; ...


1

You normally would access environment variables using the following syntax: env.MY_ISSUE_ID Typically you'll see the following in practice regarding envvars: pipeline { agent any environment { MY_ISSUE_ID = 'PROJECT-1234' } stages { stage('Build') { steps { echo env.MY_ISSUE_ID } } } } or node{ stage('Build') ...


1

As Tensibai mentioned in the comment - better way is backup you Jenkins instance before an update There are different ways to do this: Plugins Jenkins has a lot of backup plugins, most popular is: PeriodicBackup Plugin - be aware, has status This plugin is up for adoption right now, that means there is can be lack of support thinBackup Plugin - the same ...


1

use try/catch def safeBuildUser = "unknown" wrap([$class: 'BuildUser']) { try { safeBuildUser = BUILD_USER } catch (e) { echo "User not in scope, probably triggered from another job" } } echo "Builduser is: ${safeBuildUser}"


1

I've done this before. Essentially you can use the Jenkins CLI to import/export jobs, which will allow you to create and/or update a job with the definition you want to run. Be it JenkinsFile or some groovy script or whatever. Check this blog for details. Once you (re)define the job, you will simply remotely execute it using the same Jenkins CLI. You can ...


1

If you need to trigger a job from CLI and wait for its completion you can use "Jenkins CLI" (see here). However jenkins CLI does not support promotions so for them I came up with the following script: #!/bin/bash # Trigger a promotion and wait for its completion # # For triggering jobs jenkins cli is sufficient: https://support.cloudbees.com/hc/en-us/...


1

@Pierre.Vriens, wrt your ask about “investigate the feasibility of managing data stored in personal files (PDSes, i.e. partitioned data sets) on the mainframe.”, you can use zOS Management Facility (zOSMF) which comes with the z/OS operating system to access APIs for that. In Sujay's reply, he suggests using Brightside and that tool taps into the zOSMF APIs ...


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