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
# Script to find resources in AWS by an specific tag missing | |
# Example basic execution: python find_untagged_resources.py EMNF | |
# Example of more complex execution: python find_untagged_resources.py EMNF --keywords jenkins,monitor,feedback,certification | |
# Credits to https://medium.com/@CevoAustralia/using-the-new-resource-tagging-api-in-anger-1bfb2fe38242 | |
# Taken some of its code and modified for the needs with a some (a lot) of modifications | |
import boto3 | |
import sys | |
import csv | |
import argparse |
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
node('devops') { | |
// Clean up the workspace so that we always start from scratch. | |
stage('cleanup') { | |
step([$class: 'WsCleanup']) | |
} | |
stage('Update Caseflow Certification Demo Env'){ | |
docker.image('python:alpine3.8').inside("--user root") { | |
stage('Install Dependencies') { | |
sh """ |
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
{ | |
"ansible_job_id": "84511952105.3597", | |
"attempts": 2, | |
"changed": true, | |
"cmd": "source ../caseflow-certification_env.sh && bin/rake db:migrate", | |
"delta": "0:00:01.474488", | |
"end": "2019-04-02 11:07:01.767814", | |
"finished": 1, | |
"rc": 0, | |
"start": "2019-04-02 11:07:00.293326", |
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
service: appeals | |
frameworkVersion: ">=1.0.0 <2.0.0" | |
package: | |
individually: true | |
exclude: | |
- .git/** | |
- lib/** | |
- .venv/** | |
- .venvdev/** | |
- .vscode/** |
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 argparse | |
import boto3 | |
import logging | |
import sys | |
from botocore.exceptions import ClientError, WaiterError | |
def main(): | |
logging.basicConfig(format='%(asctime)s %(levelname)-8s %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') | |
parser = argparse.ArgumentParser(description='') |
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
## FIND LATEST AMI | |
- name: Find the latest Base AMI | |
vars_files: | |
- vars/faster-certification.yml | |
ec2_ami_find: | |
ami_tags: | |
app_project: "dsva-appeals" | |
application: "certification-base-ami" | |
latest: "true" | |
sort: name |
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/bash | |
#input vars: | |
# stage: [prod, staging] | |
# aws_profile: [default] | |
bold=$(tput bold) | |
normal=$(tput sgr0) | |
USAGE=$(cat <<-END |
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
FROM ruby:2.5.1-slim | |
MAINTAINER Development and Operations team @ Department of Veterans Affairs | |
# Build variables | |
ENV BUILD build-essential postgresql-client libaio1 libpq-dev libsqlite3-dev curl software-properties-common apt-transport-https | |
ENV CASEFLOW git nodejs yarn | |
# Environment (system) variables | |
ENV LD_LIBRARY_PATH="/opt/oracle/instantclient_12_1:$LD_LIBRARY_PATH" \ | |
ORACLE_HOME="/opt/oracle/instantclient_12_1" \ |
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
def helper_findLineUploadRemainingOfFile(bucket, key, filename, commands_list, start, end): | |
s3 = boto3.resource('s3') | |
command_found = False | |
with open('/tmp/{}_temp'.format(filename), 'w+') as new_file: | |
for command in commands_list: | |
line = f"{start} {command} {end}" | |
new_file.write(line) | |
# upload the file | |
file_n_path = "/tmp/{filename}_temp".format(filename= filename) |
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
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/ruby:2.2-node-browsers | |
environment: | |
- DBUS_SESSION_BUS_ADDRESS: /dev/null | |
- RAILS_ENV: test | |
- NODE_ENV: test | |
- MOCHA_FILE: /home/circleci/test-results/mocha/mocha.xml |