Download here: ActivePerl is currently the most popular way to get Perl for Windows.If 'query_key' in le and self.SvnlookPath = 'C:\\Progra~1\\Visual~1\\bin\\svnlook.exe' # If there is a query_key, use that in the title Self.pipeline = self.issueĭef create_default_title(self, matches, for_search=False): ("Opened Jira ticket: %s" % (self.issue)) Raise EAException("Error creating JIRA ticket: %s" % (e)) ('Commenting on existing ticket %s' % (ticket.key))ĭescription = str(JiraFormattedMatchString(le, match))ĭescription = '\n-\n' Ticket = self.find_existing_ticket(matches) Timestamp = pretty_ts(match])Ĭomment = "This alert was triggered again at %s\n%s" % (timestamp, text) Text = str(JiraFormattedMatchString(le, match)) Logging.exception("Error while searching for JIRA ticket using jql '%s': %s" % (jql, e))ĭef comment_on_ticket(self, ticket, match): Jql = 'project=%s AND summary~"%s" and created >= "%s"' % (self.project, title, date) # directly adjacent to words appear to be okĭate = (() - datetime.timedelta(days=self.max_age)).strftime('%Y/%m/%d') Title = self.create_default_title(matches, True) # Default title, get stripped search version #JIRA CLIENT PYTHON PASSWORD#Raise EAException('Jira account file must have user and password fields') If 'user' not in account_conf or 'password' not in account_conf: :param account_file: Name of the file which contains user and password information. """ Gets the username and password from a jira account file. Options=ĭef get_jira_account(self, account_file): Jira = JIRA(basic_auth=(settings.JIRA_USERNAME, settings.JIRA_PASSWORD), #JIRA CLIENT PYTHON CODE#Print("There is code in that CRE already. Issues_boolean = (issues_boolean)or(len(issues_in_cre2)>1 or (str(issues_in_cre2)!="" and not (str(issue) in str(issues_in_cre2))))Ĭomment_str = "There is currently code in that CRE : " str(issues_in_cre) str(issues_in_cre2) ". Issues_in_cre2 = arch_issues(jira_search_string) Jira_search_string= 'project=CD and status ="Testing Complete" and "Application/Product"=SMART and "Test Environment"=' str(current_cre) Print("Boolean for checking issues in CRE: ", issues_boolean) Print("Number of issues in CRE: ", len(issues_in_cre)) Print("This ticket is itself: ", (str(issue) in str(issues_in_cre))) Print("This ticket is itself: ", issue, issues_in_cre) Print("jira search string ", jira_search_string) Issues_boolean = len(issues_in_cre)>1 or (str(issues_in_cre)!="" and not (str(issue) in str(issues_in_cre))) Issues_in_cre = arch_issues(jira_search_string) Jira_search_string= 'project=CD and status ="Deployed to CRE" and "Application/Product"=SMART and "Test Environment"=' str(current_cre) """ This looks for any cards already in the Test Environment or Staging release approved that aren't the current cardĬurrent_cre = _13128 Logging_message('Jira session created on: Base URL = %s, Version = %s, Ticket = %s' % (rver_info(), rver_info(), issue.key)) Print ('\t\tExample: $> /home/appadmin/scripts/build_cre/helper_deploy.sh CD-000\n') Print ('\n- Ticket has to be in Jira production example "CD-000" -') Jira = JIRA(options, basic_auth=('autoappadmin', pw)) Logging_message('Creating Jira session.') # 'verify': '/home/appadmin/scripts/build_cre/jira.cer', Print 'Issue ', issueId, ' state is ',, 'please check!'ĭef updateIssue(self, issueId, commitMessage):Ĭomment = 'A commit with %s is done using this JIRA' % commitId Print 'Issue ', issueId, ' is in correct state ', issueState Print 'Issue ', issueId, ' correct owner is ',, 'please check!'ĭef verifyIssueState(self, issueId, issueState): Print 'Issue ', issueId, ' belongs to correct owner ', emailId Self.jira = JIRA(basic_auth=(userName, password))ĭef verifyIssueOwner(self, issueId, emailId): Def _init_(self, server, userName, password):
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |