Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Watkins twasink

View GitHub Profile
@twasink
twasink / Jenkins-Dockerfile
Last active Jun 25, 2021
Jenkins Image, using Docker-in-Docker
View Jenkins-Dockerfile
# We need Ruby to do a lot of stuff; let's install it here
# Using buster because that's what the Jenkins build is based on.
FROM ruby:2.7-buster as ruby
COPY --from=ruby / /
FROM jenkins/jenkins:lts-jdk11
MAINTAINER Robert Watkins
USER root
@twasink
twasink / Jenkins.yaml
Last active Jun 25, 2021
Jenkins ECS CloudFormation
View Jenkins.yaml
AWSTemplateFormatVersion: 2010-09-09
Description: Jenkins ECS Service
# This configures a Jenkins instance, using a custom Docker image,
# running as a container on Amazon's ECS.
Parameters:
AvailabilityZone:
Type: AWS::EC2::AvailabilityZone::Name
Default: us-east-1a
@twasink
twasink / nexus.yaml
Created Jun 20, 2021
Nexus ECS CloudFormation
View nexus.yaml
AWSTemplateFormatVersion: 2010-09-09
Description: Nexus ECS Service
# This configures a Sonatype Nexus 3 instance, running as a container on Amazon's ECS.
# This particular version is part of an ecosystem where other resources,
# such as a DNS zone and load balancer, are already created.
# These are referred to with !ImportValue statements
Parameters:
AvailabilityZone:
@twasink
twasink / AjaxErrorHandlingSpikeSpec.js
Created Sep 16, 2019
An attempt to explore how error handling in ExtJS AJAX requests work. Use ExtJS, Jasmine
View AjaxErrorHandlingSpikeSpec.js
/**
* An attempt to explore how error handling in ExtJS AJAX requests work,
* in particular looking at ways to re-try requests and cope with
* both the conventional 'success/fail/callback' style and this
* new-fangled 'then/always/otherwise' promise approach.
*/
describe("Twasink.spike.AjaxErrorHandlingSpikeSpec", function() {
var successHandler;
var failHandler;
var alwaysHandler;
View publish_to_s3_Jenkinsfile
#!groovy
node {
// Need to replace the '%2F' used by Jenkins to deal with / in the path (e.g. story/...)
// because tests that do getResource will escape the % again, and the test files can't be found
ws("workspace/${env.JOB_NAME}/${env.BRANCH_NAME}".replace('%2F', '_')) {
// Mark the code checkout 'stage'....
stage 'Checkout'
checkout scm
// Mark the code build 'stage'....
@twasink
twasink / PublicSubnets.yaml
Created Jan 15, 2019
Example CloudFormation stack building two public subnets.
View PublicSubnets.yaml
---
AWSTemplateFormatVersion: '2010-09-09'
Description:
The Public Subnet, and associated routing information
# Metadata: # no metadata
Parameters:
Environment:
Type: String
@twasink
twasink / Globals.yaml
Created Jan 15, 2019
Baby's First CloudFormation Stack
View Globals.yaml
---
AWSTemplateFormatVersion: '2010-09-09'
Description:
Global configuration that could be used by multiple related stacks
# Metadata: # no metadata
Parameters:
Environment:
Type: String
@twasink
twasink / Description
Created Jun 6, 2012
Spring, JPA, HSQLDB and automatically creating tables
View Description
Same as the earlier gist, but with JPA wrapping hibernate. Note that the choice of wether to create the tables or not is in the spring-config file, NOT the persistence.xml file like a lot of other examples out there.
@twasink
twasink / Description
Created Jun 6, 2012
Spring, Hibernate, HSQLDB and automatically creating tables
View Description
An example of using Spring and Hibernate together to automatically create a HSQLDB in-memory database for testing hibernate mappings.
@twasink
twasink / master_Dockerfile
Created Aug 1, 2016
A docker file for a Jenkins master server
View master_Dockerfile
FROM jenkins:2.7.1
MAINTAINER Robert Watkins
USER root
RUN mkdir /var/log/jenkins
RUN mkdir /var/cache/jenkins
RUN chown -R jenkins:jenkins /var/log/jenkins
RUN chown -R jenkins:jenkins /var/cache/jenkins
USER jenkins