Skip to main content

Posts

Azure CICD using DevOps

Create Azure subscription and use it in pipelines and releases Environment:Azure Cloud Server URL:https://management.azure.com/ Scope Level: Subscription Subscription Id: Subscription Name: Service Principal Id: Credential: service principal key Tenant ID: Service Connection Name: subscription_name Security: Grant access permission to all pipelines Step1: Create Pipeline -   azure-pipelines.yml - ensure auto trigger # Maven # Build your Java project and run tests with Apache Maven. # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/java trigger : -  master -  releases/* pool :    vmImage :  ubuntu-latest steps : -  task :  Maven@3    inputs :      mavenPomFile :  'pom.xml'      mavenOptions :...

Python Module Installation Issues and Work Arrounds

Problem :  When Running PYODBC in Mac , User getting Error "pyodbc.OperationalError: ('08001', '[08001] [Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection (0) (SQLDriverConnect)')"  Solution :  Run the following commands rm -rf /usr/local/opt/openssl version=$(ls /usr/local/Cellar/openssl@1.1 | grep "1.1") ln -s /usr/local/Cellar/openssl@1.1/$version /usr/local/opt/openssl Source: https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/known-issues-in-this-version-of-the-driver?view=sql-server-ver15

JIRA AUTO CLOSE

JRPY import pandas import subprocess import time import logging import sys #Logging Initialization logging.basicConfig (filename=’/data/jira_closure.log’,                                        format='[%( asctime )s {%(pathname)s:%( lineno )d} :%( levelname )s ] \n %(message)s',                datefmt ='%m-%d-%Y %H:%M:%S',                level=logging.INFO,                filemode ='w')   logger= logging.getLogger (__name__) from datetime import datetime,timedelta import json from jira import JIRA,JIRAError from master_key import GETPWD   statTM = datetime.now () pwd =GETPWD() if len ( sys.argv ) > 1:     dry-run = sys.argv [1]     logger.info( f"DEFAULT EXECUTION of { sys.argv [1]} in DRY RUN (FLAG {dry-run})") else:     dry-run ="Y"     logger.info( f"DEFAULT EXECUTION of { sys.argv [1]} in DRY RUN (FLAG {dry-run})")   def close_jira ( jiraTKT,dat...

Automation of Extracting JIRA Issues and Loading to Hive Table Using Python and Shell Script

Automation of Extracting JIRA Issues and Loading to Hive Table Using Python and Shell Script Orchestrate End to End flow of Extracting JIRA issues with custom fields using Python and loading them to Hive using Shell Script. Requirements: Python Modules: jira pandas   Process: jira python module extracts using JIRA REST API , for more information please see ( https://pypi.org/project/jira/ ) . Pandas Modules is used to convert the list to data frame and write to CSV files with specified delimiter which can be used to load to hive table. CODE:   from jira import JIRA import pandas as pd   #Specify your company base_url for JIRA Board URL = ‘ https :// xxx . jira . com’   #authenticate JIRA using basic authentication Username and Password jira = JIRA ( server = URL , basic_auth =( ‘ username’ , ’password ’ ))   #PULL all the aviable issues in JIRA for the project specified....