Skip to main content

CI-CD_002 - Jenkins HipChat Notifications

Notify your team about the build with status in HipChat


  • To have this feature you need to install the HipChat Plugin.
    * Go to "Manage Jenkins"
    * Click on "Manage Plugins"
    * Click on "Available tab"
    * In the filter search for "HipChat"
    * Select "HipChat Plugin" and click on "Install without restart"
  • Now restart your jenkins. You can do it depending on the way using jenkins.
    • If you are using jenkins directly then
        * service jenkins restart
    
    • If you are using jenkins through tomcat then
        * Login to your tomcat webui, go to "Manager App" and click on "Reload Jenkins"
            (or)
        * http://<HOSTNAME/IP>:8080/jenkins/restart
    
  • Now you need to login to your HipChat web-ui and go to the room on which you have Admin access.
  • NOTE : To get admin access you need to create a room. You will be admin of the room that you've created.
    * Login to your hipchat account ( https://<my-hipchat>.hipchat.com/rooms/ )
        -- Ex: https://linux-library.hipchat.com/rooms/
    * Find and click on the room you've created.
    * Click on "Tokens"
    * Under the "Create new token" section provide a lable for your notification message.
    * Select "Send Notification" from "Scopes"
    * Click on Create.

    -- Above the "Create new token" section you'll get the Token with the lable you've give.

    * Copy that token.

    -- Now in the url after "tokens/" you'll notice a number that is your room number.

    * Copy that number.
  • Now you need to configure these details in Jenkins.
    * Go to your jenkins home page click on "Manage Jenkins"
    * Click on "Configure System"
    * Go to "Global HipChat Notifier Settings" and provide the following settings
        * HipChat Server    : api.hipchat.com
        * Use v2 API        : yes
        * API Token     : <Paste your token here>
        * Room          : <Paste your room-id here>
    * Click Save
  • Now in your project add the "Post-build Actions"
    * Click on "Add post-build action"
    * Select "HipChat Notifications" and provide the following details
        * Project Room      : <Paste your room-id here>
    * Under message templates provide the following values to get your build status notification.
        * Job started   :   ${JOB_NAME} #${BUILD_NUMBER}  ---  $STATUS  ---  ${URL}
        * Job completed :   ${JOB_NAME} #${BUILD_NUMBER}  ---  $STATUS - $DURATION  ---  ${URL}
  • Now start the build and verify the build status notification in HipChat.

Comments

Popular posts from this blog

Troubleshooting Tomcat using Catalina log

Troubleshooting Tomcat using Catalina log We can get the  catalina  logs in  $CATALINA_HOME/logs Here we'll have a  catalina.out We can see some huge info in that log file. If we want to what exactly happens since the start of tomcat then we need to log that into a new file. By default we have log rotation enabled on this logs. For now let us stop tomcat and nullify the catalina.out file and then start tomcat to have some new info in the catalina.out # service tomcat stop # cd $CATALINA_HOME/logs # :> catalina.out (or) cat /dev/null > catalina.out # ll catalina.out -rw-r----- 1 root root 0 Feb 18 16:19 catalina.out # service tomcat start # ll catalina.out -rw-r----- 1 root root 17341 Feb 18 16:21 catalina.out We can see the log being written after the start of tomcat. Now we can notice the instance giving some information about the starting of tomcat, about the configuration for the startup, path of the servlet instance for which the log is re...

Ansible Installation Steps Red Hat Enterprise Linux 7

Ansible is a simple IT automation engine that automates provisioning, configuration management, application deployment and many other IT needs.  Designed for multi-tier deployments, ansible models your IT infrastructure by describing how all of your systems interrelate, rather than just managing one system at a time. In this Article we are going to learn Ansible Installation Steps Red Hat Enterprise Linux 7 – RHEL 7. It uses no agents and no additional custom security infrastructure, so it’s easy to deploy – and most importantly, it uses a very simple language YAML that allow you to describe your automation jobs in a way that approaches plain English. Ansible Architecture Ansible works by connecting to your nodes and pushing out small programs, called “Ansible modules” to them. These programs are written to be resource models of the desired state of the system. Ansible then executes these modules using SSH Protocol, and removes them when finished. Your library of modul...

RHVH 4.1 Installation Steps for Red Hat Virtualization Host

Red Hat Virtualization Host (RHVH 4.1) is installed using a special build ( Download Link )of Red Hat Enterprise Linux with only the packages required to host virtual machines. It uses an Anaconda installation interface based on the one used by Red Hat Enterprise Linux hosts, and can be updated through the Red Hat Virtualization Manager or via yum. Using the yum command is the only way to install additional packages and have them persist after an upgrade. In this article we are going to see RHVH 4.1 installation RHVH features a Web interface for monitoring the host’s resources and performing administrative tasks. Direct access to RHVH via SSH or console is not supported, so the Cockpit user interface provides a graphical user interface for tasks that are performed before the host is added to the Red Hat Virtualization Manager, such as configuring networking and deploying a self-hosted engine, and can also be used to run terminal commands via the  Tools > Terminal. Access t...