- Replace < BITBUCKET REPO URL > with your bitbucket repo URL in lib.php and pull-build.php
- This is also validating coding standard as per PHPCS, please change the path accordingly in lib.php
- pull-build.php get the changelogs and lib.php have the function to accept/decline/post comment on PR
- PHPCS is optional and maintained with a repository variable, and also some of the variables needed $BB_USERNAME $BB_PASSWORD $BB_PHPCS $BB_DECLINE
- Make a user in bitbucket, create an app password and use that username and password for this. that user must have access to the repo and shoudl be able to read and write to accept and decline the Pull request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
df -Ph | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5,$1 }' | while read output; | |
do | |
max=40% | |
echo $output | |
used=$(echo $output | awk '{print $1}') | |
partition=$(echo $output | awk '{print $2}') | |
if [ ${used%?} -ge ${max%?} ]; then | |
echo "The partition \"$partition\" on $(hostname) has used $used at $(date)" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 ssl; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
// ssl cert | |
ssl_certificate /etc/ssl/certs/nginx/client_ssl.chained.crt; | |
ssl_certificate_key /etc/ssl/certs/nginx/client_ssl.key; | |
server_name client.com; // servername |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import json | |
import os | |
import logging | |
region = '' | |
region = os.environ['region']; | |
if not region : | |
logger.error('Missing region'); | |
raise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import json | |
import os | |
import logging | |
region = '' | |
region = os.environ['region']; | |
if not region : | |
logger.error('Missing region'); | |
raise |
you must have following pre-requsite
instance_id = '' # hard-code for example
document_name = '<>' # run command document name
command_param = {'commands': ['sh /root/shellscript.sh '+ shellparam]}, # shell script path
s3_bucket = 'mybucket' # to store the logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
import re | |
from collections import OrderedDict | |
from pprint import pprint | |
import boto3 | |
ec2 = None | |
# define your region and run in cloud shell |
OlderNewer