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
-- Create a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
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
# docker build -t ubuntu1604py36 | |
FROM ubuntu:16.04 | |
RUN apt-get update | |
RUN apt-get install -y software-properties-common vim | |
RUN add-apt-repository ppa:jonathonf/python-3.6 | |
RUN apt-get update | |
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv | |
RUN apt-get install -y git |
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 | |
set -e | |
HOST=localhost | |
DB=test-entd-products | |
COL=asimproducts | |
S3PATH="s3://mongodb-backups-test1-entd/$DB/$COL/" | |
S3BACKUP=$S3PATH`date +"%Y%m%d_%H%M%S"`.dump.gz | |
S3LATEST=$S3PATH"latest".dump.gz | |
/usr/bin/aws s3 mb $S3PATH |
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 | |
# Make sure to: | |
# 1) Name this file `backup.sh` and place it in /home/ubuntu | |
# 2) Run sudo apt-get install awscli to install the AWSCLI | |
# 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
# 4) Fill in DB host + name | |
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
# 6) Run chmod +x backup.sh | |
# 7) Test it out via ./backup.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
node { | |
stage('git'){ | |
git 'https://github.com/allure-examples/allure-testng-example.git' | |
} | |
stage('test'){ | |
def mvnHome = tool 'Maven 3.x' | |
def mvn = "${mvnHome}/bin/mvn" | |
sh "${mvn} test" | |
} |
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 | |
# PLACEHOLDERS | |
# [STAGING_FOLDER] - staging directory in your server | |
# [STAGING_URL] - staging url | |
# [STAGING_USER] - staging user in the server | |
# [STAGING_MYSQLUSER] - staging mysql user | |
# [STAGING_MYSQLPASSWORD] - staging mysql password | |
# [ROOTUSER] - Mysql root user | |
# [ROOTPASSWORD] - Mysql root password |
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 | |
# This script will locally construct a merge commit for a pull request on a | |
# github repository, inspect it, sign it and optionally push it. | |
# The following temporary branches are created/overwritten and deleted: | |
# * pull/$PULL/base (the current master we're merging onto) | |
# * pull/$PULL/head (the current state of the remote pull request) | |
# * pull/$PULL/merge (github's merge) | |
# * pull/$PULL/local-merge (our merge) |