Skip to content

Instantly share code, notes, and snippets.

View plokhande's full-sized avatar

Poornima Lokhande plokhande

View GitHub Profile

Keybase proof

I hereby claim:

  • I am plokhande on github.
  • I am plokhande (https://keybase.io/plokhande) on keybase.
  • I have a public key ASCvrV9VHLtg50DbLdYK7oPkBC_4oFWQ0yhjCRTp_EIgVAo

To claim this, I am signing this object:

@plokhande
plokhande / Jenkins_sudo_script
Created February 6, 2018 04:19 — forked from oleg-nenashev/Jenkins_sudo_script
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");
# Easy Setup Locally using Kitchen/SSH Driver
#
# Following the Steps on the README.md
# => https://github.com/opscode-cookbooks/delivery-cluster#easy-setup
#
# 1) Download your Delivery license key
# => I have already my Delivery License locally. Get one with your Chef Rep. :)
#
# 2) Provisioning infrastructure [SSH/Kitchen]