I hereby claim:
- I am garimadamani on github.
- I am garimadamani (https://keybase.io/garimadamani) on keybase.
- I have a public key ASB_o_F0qgFmVFCYSZWODnDj9DjwidFiCBmU_wWZs29ikQo
To claim this, I am signing this object:
| import java.util.*; | |
| public class Knapsack { | |
| public static void main(String[] args) { | |
| Scanner input = new Scanner(System.in); | |
| int noOfInputs = input.nextInt(); | |
| for (int x = 0; x < noOfInputs; x++) { |
| // Name: get_job_details_by_name.groovy | |
| // Author: Garima Damani | |
| // --------------------------------------------------------------- | |
| // This script gets the below job details with the given job name: | |
| // *Full name | |
| // *Last build number | |
| // *Last build time | |
| // *Last build cause | |
| // *Last success build number | |
| // *Last result |
| #!/bin/bash/ | |
| FILE_PATH=”/var/opt/scripts/past_1min.log” | |
| FETCH_LOG=”/var/opt/jfrog/artifactory/logs/request.log” | |
| while true | |
| do | |
| TIME=$(date — date “-1min” ‘+%Y%m%d%H%M’) | |
| sed -n “/^$TIME/,$ p” $FETCH_LOG > $FILE_PATH | |
| echo -n “$(grep ‘HTTP/1.1|20.|’ $FILE_PATH | wc -l)” > /var/opt/scripts/parse.out.log |
| #!/bin/bash/ | |
| FILE_PATH=”/var/opt/scripts/past_1min.log” | |
| FETCH_LOG=”/var/opt/jfrog/artifactory/logs/request.log” | |
| while true | |
| do | |
| TIME=$(date — date “-1min” ‘+%Y%m%d%H%M’) | |
| sed -n “/^$TIME/,$ p” $FETCH_LOG > $FILE_PATH | |
| echo -n “$(grep ‘HTTP/1.1|20.|’ $FILE_PATH | wc -l)” > /var/opt/scripts/parse.out.log |
| import socket | |
| import time | |
| from prometheus_client import Enum, start_http_server, Gauge | |
| start_http_server(9091) | |
| def artifactory_status(art_states): | |
| sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| sock.settimeout(2) |
| [program:parse_logs] | |
| command=bash /var/opt/scripts/parse_logs.sh | |
| autostart=true | |
| autorestart=false | |
| startretries=1 | |
| stderr_logfile=/var/log/parse_logs.err.log | |
| stdout_logfile_maxbytes=0 | |
| stderr_logfile_maxbytes=0 | |
| user=root |
| # Installing Supervisord | |
| apt-get update && apt-get install -y python-setuptools | |
| easy_install supervisor | |
| mkdir /etc/supervisor | |
| echo_supervisord_conf > /etc/supervisor/supervisord.conf | |
| mkdir /etc/supervisor/conf.d |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| echo "Adding user $1 with sudo access" | |
| adduser --disabled-password --gecos "" $1 | |
| cd /home/$1/ | |
| mkdir .ssh | |
| cd /home/$1/.ssh/ | |
| touch authorized_keys | |
| echo $2 >> authorized_keys | |
| cd /home/$1/ |
| import hudson.model.Job | |
| import jenkins.model.Jenkins | |
| import hudson.tasks.LogRotator | |
| import jenkins.model.BuildDiscarderProperty | |
| name = "test_master_builder_medium_blog" | |
| job_daystokeep = -1 | |
| job_numtokeep = 20 | |
| artifact_numtokeep = 20 | |
| artifact_daystokeep = -1 |