POP Keywords: apache oracle sybase ...

Jenkins email-ext RequesterRecipientProvider always empty

This one was hard to track down. I couldn’t figure out why email-ext [$class: ‘RequesterRecipientProvider’] kept being empty on my declarative pipeline. Looking at console output for given run, printed message was: Not sending mail to user noreply@github.com with no permission to view……An attempt to send an e-mail to empty list of recipients, ignored. Luckily, i finally found this post: https://issues.jenkins-ci.org/browse/JENKINS-4350 If you have a similar setup, i.e. Github + (multi-branch) pipeline + email-ext, then odds are that you need to do the following: in Jenkins, click on your pipeline > Configure Go to section “Branch Sources” > Github > […]

Building a CI/CD pipeline for a microservice application

Building a CI/Cd pipeline for microservice application is easier said than done. On our side, here have been the choices made so far: each microservice has its own git repository (isolation of services) each microservice is designed to be stateless (scalability) – except for db service obviously testing is made of unit-tests (i.e. standalone tests) and integration tests on Git side, we try to keep things simple by doing following: use a feature-branch flow “master” is stable branch, only pushable by Jenkins (our ci tool) each new dev starts with a feature branch and get merged into master through pull-requests […]

Configure Jenkins for sending email

Below are steps to configure Jenkins for sending email Configure SMTP configuration Go to Jenkins > Manage Jenkins > Configure System Find section “E-mail Notification” Fill up required details based on your own SMTP configuration parameters SMTP Server: smtp.server.com Use SMTP Authentication: checked User Name: user@email.com Password: ******* Use SSL: checked SMTP port: 465 (or your smtp port if different) Click on “Apply” Note that “from” address in sent email is set to “System Admin e-mail address” defined in “Jenkins Location” section. You may want to edit that one to match your expectation. Immediately test sending an email using option […]

Setup github webhooks for jenkins

This post describes required steps to setup up github webhooks for jenkins so that builds start upon github repository actions. Pre-requisites You have a github account and a repository defined there Jenkins is up and running and accessible from web In case of private repository, you may want to read configure jenkins to log in into Github Configure github log into your github account select your repository > Settings > Webhooks > add new webhook configure your webhook as per below: append “/gihub-webhook/” to end of your jenkins url choose type “application/json” select events “Pull requests” and “Pushes” flag your […]

Configure Jenkins to log into Github account

By default, Jenkins is connecting anonymously to github account. Although this setting is fine to start with, it quickly becomes a limitation when dealing with private repos and when timeouts on anonymous users are triggered on Github side. This post details steps to configure Jenkins and Github to allow Jenkins to authenticate on Github. Approach There are several ways of authenticating, which are all more or less described in https://developer.github.com/v3/guides/managing-deploy-keys/#deploy-keys It is possible to: ssh through your own account use authentication token with oauth api on your own account setup ssh “deploy keys” on a per repository basis use a […]

Configure user access rights on Jenkins

This post is continuing upon “how to allow users to authenticate using their github credentials“. Note that it is not a pre-requisite, users can login using other login functionality (jenkins credentials, LDAP, …) – see jenkins documentation for more information on that part. For this section, I would recommend setting up Role-based Authorization Strategy Plugin. This plugin will allow to define notion of “roles”, assign rights to roles and user to roles. Follow plugin instructions on how to install this plugin into your jenkins app. Possible access rights restriction Let’s go to your Jenkins app > Configure Global Security > […]

Login into jenkins with your github credentials

Github Oauth Plugin is to allow users to log in your jenkins app using their github account credentials (initially i thought it was to authenticate jenkins app on github) Follow plugin instructions, i.e.: In your Github account Go to Settings > Developer settings > Oauth App > New oauth App Configure your app as per documented name: Jenkins homepage: url to your jenkins app (it does not really matter though) authorization callback url: <your_jenkins_app_url:port>/securityRealm/finishLogin “callback setting” is the important one Write down generated “Client-ID” and “Client-Secret”, they will be needed on Jenkins side In your jenkins app Now it is […]

add self signed certificate

Here are steps to add a new self-signed certificate. log into server run below command sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/<fulldomain>-selfsigned.key -out /etc/ssl/certs/<fulldomain>-selfsigned.crt while being asked to feed details, make sure to fill QNAME with your full (sub)domain name for which this certificate is going to be used once certificate is generated, edit /etc/apache2/sites-available/<mysite-config-file>.conf Link the certificate there as in below: SSLCertificateKeyFile /etc/ssl/private/<fulldomain>-selfsigned.key SSLCertficateFile /etc/ssl/private/<fulldomain>-selfsigned.crt restart apache sudo /etc/init.d/apache2 restart Done! sources https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-16-04

unix – run/send process in the background

Below are a few ways of achieving that Option1: nohup With nohup (no-hangup): nohup <command-line> > <to_file.out> & (use >> to append) Option 2: pause/restart as background process Issue is when you need to provide some user inputs. In that case, proceed as follows: Run CLI as per normal and provide required user input Once no more input is required, hit ctrl+Z to stop/pause the job Run following command to identify your job id (different from pid): jobs Note: in above screenshot my job_id would be “1” Disown the process: disown -h %<job_id> Note: “%” is required Resume process: bg […]

word 2010 – create custom numbered fields and create a table of content out of them

Below are the steps to number TODO items automatically inside a word document and create a list of all the TODO entries existing. Numbering of fields Numbering of fields is called creating a “SEQuence” in words language. Click on “Insert” tab > “Quick Parts” down arrow > in field names list, select SEQ > create entry SEQ TODO Click on File tab > Options > Advanced > scroll to section “Show document content” > tick”Show field codes instead of their values”This will actually allow to see the code behind those fields. Go back to the word document and type the […]