View gist:a014bc9e5d5a5d85223b578510237777
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 microsoft/powershell | |
LABEL version=lastest | |
USER root | |
RUN apt-get update -y | |
RUN apt-get install wget curl -y | |
# Import the public repository GPG keys | |
RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | apt-key add - | |
RUN curl -o /etc/apt/sources.list.d/microsoft.list https://packages.microsoft.com/config/ubuntu/16.04/prod.list |
View summitJenkisfile
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 ('Windows2016') { | |
stage ('Test Pass') { | |
powershell 'Invoke-OperationValidation -testtype simple' | |
} | |
stage ('Test 2'){ | |
powershell 'invoke-pester c:\test_gabe.Tests.ps1 -OutputFormat NunitXML -OutputFile report.xml -EnableExit' | |
} | |
} |
View summit.Test.ps1
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
# To simulate failure pester check | |
Describe 'Service' { | |
it 'is summit installed' { | |
get-service -Name Summit | Should be $true | |
} | |
} |
View DockerfilePowershell
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
# Microsoft Powershell Ubuntu image | |
FROM microsoft/powershell | |
LABEL version=0.1 | |
WORKDIR /tmp | |
#Update and install Java | |
RUN apt-get update -y | |
RUN apt-get install default-jre -y | |
RUN apt-get upgrade powershell -y |
View JenkinsServiceSummit
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: jenkins | |
spec: | |
type: NodePort | |
ports: | |
- port: 8080 | |
targetPort: 8080 | |
name: http-port |
View JenkinsDeploymentSummit
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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: jenkins-deployment | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: jenkins |
View DockerfileJenkins
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 the Jenkins supported version | |
FROM jenkins/jenkins:lts | |
LABEL version=0.1 | |
#using root for installation | |
USER root | |
# Install PowerShellCore | |
RUN apt-get update -y |
View iot.py
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 os | |
import logging #for proper function logging | |
import boto3 | |
import time | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
personal_email = os.environ['email_address'] | |
topic_name = 'aws-iot-button-sns-topic-python' | |
client_sns = boto3.client('sns') |
View lambda_local_to_s3.py
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 time | |
import requests | |
import smart_open | |
import logging | |
print('Loading function') | |
def lambda_handler(event, context): | |
start_time = time.time() | |
uri = 'http://ipv4.download.thinkbroadband.com/100MB.zip' | |
response = requests.get(uri, stream=True) |
View file_go.go
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
package main | |
import ( | |
//"io/ioutil" | |
"fmt" | |
"log" | |
"io" | |
"os" | |
"net/http" | |
"time" |
NewerOlder