Skip to content

Instantly share code, notes, and snippets.

View oleg-nenashev's full-sized avatar
🐘
in the room

Oleg Nenashev oleg-nenashev

🐘
in the room
View GitHub Profile
@oleg-nenashev
oleg-nenashev / CHANGELOG-autogenerated.md
Created November 22, 2021 23:29
Keptn 0.11.0 Changelog draft

0.11.0-preview (2021-11-22)

⚠ BREAKING CHANGES

  • MongoDB was updated from 3.6 to 4.4, also the custom helm chart was switched out for the Bitnami MongoDB Helm Chart. This means that a manual database migration is needed to preserve data during the keptn upgrade process! Steps to upgrade keptn with the manual migration can be found on the Keptn Upgrade page.

Features

@oleg-nenashev
oleg-nenashev / weekly-changelog.json
Last active July 21, 2020 10:49
Test for the Jenkins shields.io changelog badge
{
"schemaVersion": 1,
"label": "Jenkins Weekly",
"message": "2.244",
"color": "blue",
"cacheSeconds": 300
}
MacBook-Pro-onenashev:jenkins.io nenashev$ ./gradlew assemble
:copyLegacyAssets
:fetchExternalResources
Successfully installed faraday-0.9.2
Successfully installed multipart-post-2.0.0
2 gems installed
:compileContent
Successfully installed awestruct-0.5.6
Successfully installed asciidoctor-1.5.4
Successfully installed kramdown-1.9.0
@oleg-nenashev
oleg-nenashev / jenkins-merge-pr.sh
Last active June 19, 2017 17:02
Simple git merge with squash for Jenkins repos
#!/bin/bash -ex
REPO_NAME=${PWD##*/}
TARGET_ORG="jenkinsci"
#TODO: fetch from GitHib API
#TODO: if no, process parameters correctly
GITHUB_PR_NUMBER=${1}
FROM_USER=${2}
BRANCH=${3}
<project ...>
...
<properties>
<findbugs-maven-plugin.version>3.0.1</findbugs-maven-plugin.version>
<findbugs.failOnError>false</findbugs.failOnError>
</properties>
...
<dependencies>
...
<dependency>
@oleg-nenashev
oleg-nenashev / Jenkins_sudo_script
Created October 2, 2014 13:53
Enables/Revokes administrative mode for users in Jenkins using Role-Strategy and Build User plugins.
import com.michelin.cio.hudson.plugins.rolestrategy.Role;
import com.michelin.cio.hudson.plugins.rolestrategy.RoleMap;
import com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy;
import jenkins.model.Jenkins;
import hudson.model.Result;
import hudson.EnvVars;
final String ROLE_PREFIX="sudo_";
EnvVars vars = build.getEnvironment(listener);
final String userName=vars .get("BUILD_USER_ID");
@oleg-nenashev
oleg-nenashev / getNodePropertyOwner.java
Last active December 17, 2015 09:49
[Jenkins] Sample function, which gets Node from Jenkins according to StaplerRequest configuration request. Function can be used as workaround for null "node" property at hudson.slaves.NodeProperty
/**
* Gets Node, which is being configured by StaplerRequest
* @param req StaplerRequest (ex, from NodePropertyDescriptor::newInstance())
* @return Instance of the node, which is being configured (or null)
*
* @author Oleg Nenashev <nenashev@synopsys.com>
*/
private static Node getNodePropertyOwner(StaplerRequest req)
{
List<Ancestor> ancestors = req.getAncestors();