This file contains hidden or 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
package com.java.utilily | |
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint | |
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase | |
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData | |
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject | |
import com.google.api.client.util.store.FileDataStoreFactory | |
import com.kms.katalon.core.annotation.Keyword | |
import com.kms.katalon.core.checkpoint.Checkpoint | |
import com.kms.katalon.core.checkpoint.CheckpointFactory |
This file contains hidden or 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 err = null | |
try { | |
node { | |
stage('Preparation') { | |
git credentialsId: 'fef4159e-285b-45d9-80ca-5981c4576ba5', url: 'https://github.com/prashant-bhatasana/demoApp/' | |
} | |
stage('Dependencies') { |
This file contains hidden or 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
--- | |
- name: ANSIBLE - Configure Node server | |
hosts: SampleApp-Server | |
become: true | |
become_method: sudo | |
become_user: nodejs | |
vars: | |
node_version: 6.9.1 |
This file contains hidden or 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 err = null | |
try { | |
node { | |
stage('Start Notification') { | |
slackSend baseUrl: 'https://prashant-bhatasana.slack.com/services/hooks/jenkins-ci/', channel: '#test_notification', color: 'Green', failOnError: true, message: " Android build pipeline - '${env.BUILD_NUMBER}' -- $STAGE ", teamDomain: 'https://prashant-bhatasana.slack.com', tokenCredentialId: '7ca00656-3323-7789-9b1a-e2c836b9a73f' | |
} | |
<<<<<<<<<<<<<<<<< Add your Pipeline Script here >>>>>>>>>>>>>>>>> | |
} |
This file contains hidden or 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
pipeline { | |
agent any | |
tools {nodejs "node"} | |
stages { | |
stage('Git') { | |
steps { | |
git 'https://github.com/****/****' |
This file contains hidden or 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
image: lambci/lambda:build-nodejs6.10 | |
pipelines: | |
default: | |
- step: | |
name: Build and package | |
script: | |
- apt-get update && apt-get install -y zip | |
- npm install | |
- npm install node-lambda -g |
This file contains hidden or 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 time | |
from botocore.vendored import requests | |
region = 'us-XXXX-2' | |
instances = ['i-XXXXXXXXXXXXXXXXXX'] | |
url = "https://hooks.slack.com/services/TBCS4ARD2/KKHJSBBBD/fdDFQxOHNpMLnb9z7FpVCLM6" | |
payload = "{ | |
\n\t\"channel\": \"#aws notification\", <Enter slack channel name> |
This file contains hidden or 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 time | |
region = 'us-XXXX-2' | |
instances = ['i-XXXXXXXXXXXXXXXX'] | |
def lambda_handler(event, context): | |
ec2 = boto3.client('ec2', region_name=region) | |
ec2.start_instances(InstanceIds=instances) | |
print 'started your instances: ' + str(instances) |
This file contains hidden or 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 time | |
region = 'us-XXXX-2' | |
instances = ['i-XXXXXXXXXXXXXXXX'] | |
def lambda_handler(event, context): | |
ec2 = boto3.client('ec2', region_name=region) | |
ec2.stop_instances(InstanceIds=instances) | |
print 'started your instances: ' + str(instances) |
This file contains hidden or 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 os | |
import boto3 | |
AMI = os.environ['AMI'] | |
INSTANCE_TYPE = os.environ['INSTANCE_TYPE'] | |
KEY_NAME = os.environ['KEY_NAME'] | |
SUBNET_ID = os.environ['SUBNET_ID'] | |
REGION = os.environ['REGION'] | |
ec2 = boto3.client('ec2', region_name=REGION) |