Skip to content

Instantly share code, notes, and snippets.

@mbaitelman
mbaitelman / log.xml
Created December 17, 2021 20:18 — forked from n1k0/log.xml
Sample JUnit XML (XUnit) test report logs for CasperJS test suite.See https://github.com/n1k0/casperjs/pull/329
<?xml version="1.0" encoding="UTF-8"?>
<testsuites duration="50.5">
<testsuite failures="1" name="Untitled suite in /Users/niko/Sites/casperjs/tests/suites/casper/agent.js" package="tests/suites/casper/agent" tests="3" time="0.256">
<testcase classname="tests/suites/casper/agent" name="Default user agent matches /CasperJS/" time="0.103"/>
<testcase classname="tests/suites/casper/agent" name="Default user agent matches /plop/" time="0.146"/>
<testcase classname="tests/suites/casper/agent" name="Default user agent matches /plop/" time="0.007"/>
</testsuite>
<testsuite failures="0" name="Untitled suite in /Users/niko/Sites/casperjs/tests/suites/casper/alert.js" package="tests/suites/casper/alert" tests="1" time="0.449">
<testcase classname="tests/suites/casper/alert" name="alert event has been intercepted" time="0.449"/>
</testsuite>
@mbaitelman
mbaitelman / jenkinsfile
Created November 2, 2020 02:47
Jenkinsfile-Terraform-Deployments
pipeline {
agent {
docker {
image 'hashicorp/terraform:0.12.29'
args '--entrypoint=""'
}
}
parameters {
choice choices: ['us-west-2', 'us-east-2'], description: '', name: 'region'
choice choices: ['Plan', 'Apply', 'Destroy'], description: '', name: 'action'
@mbaitelman
mbaitelman / readme.md
Created July 9, 2020 05:49
Fixing "Warning: Interpolation-only expressions are deprecated" with Powershell

In terraform .12 they changed how expressions are allowed to be interpolated and removed the need for quotes. So "${var.variable}" can now be var.variable.

Here is a powershell script that will loop through your Terraform code and update those expressions.

@mbaitelman
mbaitelman / Readme.md
Last active August 4, 2020 16:34
Reloading PATH for Chef on Windows

Reloading PATH for Chef on Windows

Many times when installing applications on Windows the path gets updated but Chef doesnt have the updated path. When the application gets called it cant find the application in path and the step fails.

Add the refreshenv.rb file to the libraries folder and notifies and ruby_block to the resource that needs reloading.

This code is from https://stackoverflow.com/a/49993683 and is based on the Chocolatey code

@mbaitelman
mbaitelman / main.tf
Created April 17, 2019 03:47
Example data Terraform
# AWS S3 bucket for static hosting
resource "aws_s3_bucket" "website" {
bucket = "${var.website_bucket_name}"
acl = "public-read"
tags {
Name = "Website"
Environment = "production"
}
@mbaitelman
mbaitelman / README.md
Last active February 20, 2024 22:31
Automated Terraform Deployments Using Bitbucket Pipelines
<?xml version="1.0" encoding="UTF-8"?>
<appcmd>
<SITE SITE.NAME="Default Web Site" SITE.ID="1" bindings="http/*:80:,https/*:443:,net.tcp/808:*,net.pipe/*,net.msmq/localhost,msmq.formatname/localhost,https/*:44301:" state="Started">
<site name="Default Web Site" id="1" serverAutoStart="true">
<bindings>
<binding protocol="http" bindingInformation="*:80:" sslFlags="0" />
<binding protocol="https" bindingInformation="*:443:" sslFlags="0" />
<binding protocol="net.tcp" bindingInformation="808:*" sslFlags="0" />
<binding protocol="net.pipe" bindingInformation="*" sslFlags="0" />
<binding protocol="net.msmq" bindingInformation="localhost" sslFlags="0" />