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
mkdir actions-runner; cd actions-runner | |
Invoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.306.0/actions-runner-win-x64-2.306.0.zip -OutFile actions-runner-win-x64-2.306.0.zip | |
if((Get-FileHash -Path actions-runner-win-x64-2.306.0.zip -Algorithm SHA256).Hash.ToUpper() -ne '998fd610e6024cb7015240a82a635a877aab4d6dfb0de89bdd167b0128452721'.ToUpper()){ throw 'Computed checksum did not match' } | |
Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD/actions-runner-win-x64-2.306.0.zip", "$PWD") | |
C:\actions-runner\config.cmd --url https://github.com/Github-AWS-Learning ` | |
--token $(Invoke-RestMethod -Method Post -Uri https://api.github.com/orgs/<REPLACE YOUR ORG NAME>/actions/runners/registration-token ` |
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 boto3 | |
import json | |
ACCOUNT_ID = "7088" | |
sts_client = boto3.client('sts',region_name="ap-southeast-2") | |
assumed_role_object =sts_client.assume_role(RoleArn="arn:aws:iam::7068:role/role_to_Access_s3",RoleSessionName="S3access") | |
print("assumed role: ", json.dumps(assumed_role_object,indent=4,default=str)) |
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
const AWS = require('aws-sdk'); | |
const s3 = new AWS.S3(); | |
exports.handler = async function(params){ | |
console.info('fetching file from s3 bucket'); | |
try { | |
const fileData = await s3.getObject(params).promise(); | |
console.log(JSON.parse(fileData.Body)) | |
return fileData; |
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
exports.handler = (event, context, callback) => { | |
console.log('Received event:', JSON.stringify(event, null, 2)); | |
var headers = event.headers; | |
console.log('headers: ', JSON.stringify(headers)); | |
// Parse the input for the parameter values | |
var tmp = event.routeArn.split(':'); |
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
trigger: | |
- main | |
pool: | |
name: Self-Hosted-Agent | |
variables: | |
- group: AWS | |
stages: | |
- stage: Build |
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
trigger: | |
- master | |
jobs: | |
- job: BuildAndTest | |
workspace: | |
clean: all | |
pool: | |
name: Self-Hosted-Agent |
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
trigger: | |
- main | |
variables: | |
- group: artifactory | |
- group: AWS | |
jobs: | |
- job: OnBuildHost | |
pool: |
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
trigger: | |
- main | |
variables: | |
- group: artifactory | |
jobs: | |
- job: OnBuildHost | |
pool: | |
name: Self-Hosted-Agent |
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
trigger: | |
- master | |
pool: | |
name: Self-Hosted-Agent | |
variables: | |
- group: dev | |
steps: |
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
{ | |
"id": "c6969d10-9341-469e-b32d-e0eee838c786", | |
"name": "Azure_eventhubs_env", | |
"values": [ | |
{ | |
"key": "tenantid", | |
"value": "", | |
"enabled": true | |
}, | |
{ |
NewerOlder