Skip to content

Commit

Permalink
test circle config
Browse files Browse the repository at this point in the history
  • Loading branch information
gemfarmer committed Oct 14, 2016
1 parent da5e313 commit c8ef502
Show file tree
Hide file tree
Showing 39 changed files with 297 additions and 138 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jshint:

eslint:
enabled: true
config_file: .eslintrc
ignore_file: .eslintignore

ruby:
Expand Down
5 changes: 5 additions & 0 deletions .pa11yci
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"defaults": {
"hideElements": ".speakerdeck-iframe, twitterwidget, iframe, #rufous-sandbox, #instagram-media-payload-0"
}
}
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

131 changes: 131 additions & 0 deletions Accessibility Scanning Using Pa11y-ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
## Accessibility Scanning Using Pa11y-ci

### Introduction

Building a website or application that is easy accessible toeveryone is not only an important of the user experience, but also a requirement of all federally funded projects. GSA provides a helpful [Section 508](https://section508.gov) portal. [Pa11y](https://github.com/pa11y/pa11y) is an automation tool that helps you scan your static web pages to check for accessibility problems and errors. It can be setup on your machine locally or remotely using a CI tool.

### Installation and setup(For MacOS)

1. [Concourse CI](https://concourse.ci/index.html) allows you to run multiple compliance scanning jobs on your machine using a virtual machine. It is highly recommended to go through its [excellent documentation and "Hello World" tutorial ](https://concourse.ci/hello-world.html) before writing custom jobs for your project.

2. If you want to run locally Pa11y-ci you will need to :

* install **vagrant** and **virtualbox** ](http://sourabhbajaj.com/mac-setup/Vagrant/README.html)
* use [The Fly CLI](https://concourse.ci/fly-cli.html) , a command line tool for Concourse which is used for a number of tasks from connecting to a shell in one of your build's containers to uploading new pipeline configuration into a running Concourse.

3. If you're on MacOS , you will have to `chmod +x` the downloaded binary and put it in your `$PATH`. This can be done in one fell swoop with `install path/to/fly /usr/local/bin/fly`

4. Run Vagrant

```sh
vagrant init concourse/lite # creates ./Vagrantfile
vagrant up # downloads the box and spins up the VM
```

5. Login into fly

`fly -t lite login -c http://192.168.100.4:8080`


### Running Pa11y-ci on your local machine

1. Create a `.yml` file containing the job with tasks that you want to run

`touch accessibility-scan.yml`

`vim accessibility-scan.yml`

```yml
jobs:
- name: accessibility-scan
plan:
- task: run-pa11y
config:
platform: linux
image_resource:
type: docker-image
source:
repository: node
run:
path: sh
args:
- -exc
- |
npm install -g pa11y-ci
npm install -g phantomjs
mkdir accessibility-scan
pa11y-ci --json --sitemap https://18f.gsa.gov/sitemap.xml > accessibility-scan/summary.txt
cat accessibility-scan/summary.txt
```
`type` is almost always going to be `docker-image` . `pa11y-ci` requires node, so we are using a `node` docker-image.

`run` section contains a series of shell command that we are executing:

* install pa11y-ci and phantomjsfrom the node package manager(npm)

* making a directory and telling pa11y-ci to pipe the results of the scan into a `json` file

the command is like so `pa11y-ci --json --sitemap https://[18f-static-site-url]/sitemap.xml > dir/file`

* printing the results in our CLI `cat…` (for debugging purposes, optional)

**Note that** we are using the `sitemap.xml` file instead of individual files(much more efficient)

2. Run

```shell
fly -t lite set-pipeline -p accessibility-scan -c accessibility-scan.yml
```

3. Go to the `URL` displayed on your CLI. **Click the plus sign on top right corner and toggle side bar and press play on your pipeline**. Pipelines are posed by default.


### Running Pa11y-ci with CircleCI(experimental)

If you want to run Pa11y-ci per pull request on your project:

1. Create a bash file `accessibility-scan.sh` in your project home directory to tell it to run either on a circleci supported branch or your localhost

```shell
if [[ -n $CIRCLE_BRANCH ]]; then
echo "scanning site using sitemap from 18F/${CIRCLE_BRANCH}"
pa11y-ci --sitemap https://federalist.18f.gov/preview/18F/18f.gsa.gov/${CIRCLE_BRANCH}/sitemap.xml
else
echo "scanning site using localhost sitemap"
pa11y-ci --sitemap http://localhost:4000/sitemap.xml
```

2. Modify your `circle.yml` to add pa11y-ci


```yaml
machine:
ruby:
version:
2.2.3
dependencies:
pre:
- [Your-other-commands]
- nvm install stable && nvm alias default stable
- npm test
- npm install -g pa11y-ci
test:
pre:
- bundle exec htmlproofer _site --disable-external --allow-hash-href --empty-alt-ignore --url-ignore [email protected]
- echo CIRCLE_BRANCH
- echo
- npm run --harmony accessibility-scan
```



### Adding Pa11y-ci in The Compliance Viewer(In Progress)
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gem "jekyll", '~> 3.1'
gem "html-proofer"

group :jekyll_plugins do
if ENV['FAST_BUILDS']
if ENV['FAST_BUILDS'] == 'true'
puts 'not using jekyll-archives because its sloooooooooow'
else
gem 'jekyll-archives', :git => 'https://github.com/jekyll/jekyll-archives.git'
Expand Down
47 changes: 23 additions & 24 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ GEM
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.4.0)
coderay (1.1.0)
coderay (1.1.1)
colorator (1.1.0)
colored (1.2)
ethon (0.9.0)
ethon (0.9.1)
ffi (>= 1.3.0)
ffi (1.9.14)
forwardable-extended (2.6.0)
gemoji (2.1.0)
html-pipeline (2.3.0)
activesupport (>= 2, < 5)
html-pipeline (2.4.2)
activesupport (>= 2)
nokogiri (>= 1.4)
html-proofer (3.0.6)
activesupport (~> 4.2)
html-proofer (3.2.0)
activesupport (>= 4.2, < 6.0)
addressable (~> 2.3)
colored (~> 1.2)
mercenary (~> 0.3.2)
Expand All @@ -37,7 +37,8 @@ GEM
yell (~> 2.0)
htmlentities (4.3.4)
i18n (0.7.0)
jekyll (3.2.0)
jekyll (3.3.0)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
Expand All @@ -47,47 +48,48 @@ GEM
pathutil (~> 0.9)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-feed (0.4.0)
jekyll-feed (0.8.0)
jekyll (~> 3.3)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.11.0)
jekyll (>= 2.0)
jekyll-sass-converter (1.4.0)
sass (~> 3.4)
jekyll-seo-tag (0.1.3)
jekyll (>= 2.0)
jekyll-sitemap (0.9.0)
jekyll-seo-tag (2.0.0)
jekyll (~> 3.1)
jekyll-sitemap (0.12.0)
jekyll (~> 3.3)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
jekyll_frontmatter_tests (0.0.8)
jekyll (>= 2.0, < 4.0)
jekyll_pages_api (0.1.5)
jekyll_pages_api (0.1.6)
htmlentities (~> 4.3)
jekyll (>= 2.0, < 4.0)
jekyll_pages_api_search (0.4.4)
jekyll_pages_api (~> 0.1.4)
sass (~> 3.4)
jemoji (0.5.1)
jemoji (0.7.0)
activesupport (~> 4.0)
gemoji (~> 2.0)
html-pipeline (~> 2.2)
jekyll (>= 2.0)
jekyll (>= 3.0)
json (1.8.3)
kramdown (1.11.1)
kramdown (1.12.0)
liquid (3.0.6)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
method_source (0.8.2)
mini_portile2 (2.1.0)
minitest (5.9.0)
nokogiri (1.6.8)
minitest (5.9.1)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
parallel (1.9.0)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
pkg-config (1.1.7)
pry (0.10.3)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
Expand Down Expand Up @@ -125,8 +127,5 @@ DEPENDENCIES
pry
redcarpet

RUBY VERSION
ruby 2.3.1p112

BUNDLED WITH
1.13.3
1.11.2
1 change: 1 addition & 0 deletions _config-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
env: "development"
5 changes: 4 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ title: "18F: Digital service delivery"
description: "18F builds effective, user-centric digital services focused on the interaction between government and the people and businesses it serves."
baseurl: "" # the subpath of your site, e.g. /blog
permalink: pretty
url: "https://18f.gsa.gov" # the base hostname & protocol for your site
url: "https://18f.gsa.gov" # the base hostname & protocol for your sites
federalist_url: "https://federalist.18f.gov"
localhost: "localhost:4000"
env: "production"
logo: /assets/img/logos/18F-Logo-Bright-S.png
feature_image: /assets/img/feature-background.jpg
tag_dir: tags
Expand Down
3 changes: 0 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,3 @@
================================================== -->
<link rel="stylesheet" href="{{ "/assets/css/main.css" | prepend: site.baseurl }}">

<!-- Ethnio Activation Code
================================================== -->
<script type="text/javascript" language="javascript" src="https://ethn.io/65287.js" async="true" charset="utf-8"></script>
8 changes: 5 additions & 3 deletions _plugins/embeds.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
module Jekyll
module EmbedFilter
# Pass a url like {{ "https://youtube-nocookie.com/blahblahblah/" | embed }}
# Pass a url like {{ "https://youtube-nocookie.com/blahblahblah/" | embed: "some title" }}
# It will spit out a standardized embed
def embed(input)
"<div class='embed-container'><iframe src='#{input}' width='560' height='315' frameborder='0' allowfullscreen></iframe></div>"
def embed(input, title)
title ||= input
"<div class='embed-container'><iframe src='#{input}' title='#{title}'" \
" width='560' height='315' frameborder='0' allowfullscreen></iframe></div>"
end
end
end
Expand Down
3 changes: 2 additions & 1 deletion _posts/2014-04-28-18f-demo-day-may-9-2014.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ Space is limited, so [register today to join us at GSA on May
9.](https://www.eventbrite.com/e/18f-demo-day-tickets-11062384891). We
can't wait to see you there!

{{ "https://www.youtube-nocookie.com/embed/aeQX16HCKSs" | embed }}
{{ "https://www.youtube-nocookie.com/embed/aeQX16HCKSs" | embed: 'register today to join us at GSA on May
9.' }}

[Register at Eventbrite for 18F Demo
Day](https://www.eventbrite.com/e/18f-demo-day-tickets-11062384891)
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Finally, we can use Jekyll to generate an [RSS feed](https://18f.gsa.gov/feed.xm

For example, the below IFTTT recipe will email you every time 18F publishes something:

<a href="https://ifttt.com/view_embed_recipe/214709-a-new-18f-blog-post-email-me-a-link-to-go-read-it-right-away" target = "_blank" class="embed_recipe embed_recipe-l_63" id= "embed_recipe-214709"><img src= 'https://ifttt.com/recipe_embed_img/214709' alt="IFTTT Recipe: A new 18F blog post?! Email me a link to go read it right away! connects feed to email" width="370px" style="max-width:100%"/></a><script async type="text/javascript" src= "https://ifttt.com/assets/embed_recipe.js"></script>
<a href="https://ifttt.com/view_embed_recipe/214709-a-new-18f-blog-post-email-me-a-link-to-go-read-it-right-away" target = "_blank" class="embed_recipe embed_recipe-l_63" id= "embed_recipe-214709"><img src= 'https://ifttt.com/recipe_embed_img/214709' title="IFTTT Recipe: A new 18F blog post?!" alt="IFTTT Recipe: A new 18F blog post?! Email me a link to go read it right away! connects feed to email" width="370px" style="max-width:100%"/></a><script async type="text/javascript" src="https://ifttt.com/assets/embed_recipe.js"></script>

## Automatic deployment

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ I joined 18F on the basis of my experience driving adoption of automated testing

In order to connect the dots between my Google experience and the challenges that lay ahead as part of my career with 18F, I produced a talk called _Large Scale Development Culture Change: Google and the U.S. Government_. [The slides are freely available](https://goo.gl/TU2pii), as is the webinar video of my December 2, 2014 delivery of the talk at the General Services Administration Headquarters:

{{ "https://www.youtube-nocookie.com/embed/CWSLSHljQLM" | embed }}
{{ "https://www.youtube-nocookie.com/embed/CWSLSHljQLM" | embed: "Large Scale Development Culture Change: Google and the US Government" }}

We at 18F hope that many of these ideas will resonate with like-minded "Instigators" throughout the federal IT community, as well as the broader tech industry. In the coming weeks, I will post more regarding tools and processes that we're developing to improve our internal communications, and how we envision that widespread adoption of these tools and processes will help us cultivate knowledge and expertise throughout the federal government. By empowering developers and teams at the grassroots level to make incremental improvements in their own environments, we aim to effect lasting changes that improve the quality of services across all federal agencies, and ultimately the quality of life for American citizens.
8 changes: 4 additions & 4 deletions _posts/2014-12-12-going-to-gov-college.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ Our team is passionate about collaboration with our fellow agencies on topics al

### "Large Scale Development Culture Change: Google and the U.S. Government"

{{ "https://www.youtube-nocookie.com/embed/CWSLSHljQLM" | embed }}
{{ "https://www.youtube-nocookie.com/embed/CWSLSHljQLM" | embed: "Large Scale Development Culture Change: Google and the U.S. Government" }}

### "Out in the Open: The Role of Open Source in Building the Consumer Financial Protection Bureau"

{{ "https://www.youtube-nocookie.com/embed/tce1B02ZGqc" | embed }}
{{ "https://www.youtube-nocookie.com/embed/tce1B02ZGqc" | embed: "Out in the Open: The Role of Open Source in Building the Consumer Financial Protection Bureau" }}

### "Recent API Trends in Government: API Standards and Open Source Documentation"

{{ "https://www.youtube-nocookie.com/embed/ZRhRU5y0jEk" | embed }}
{{ "https://www.youtube-nocookie.com/embed/ZRhRU5y0jEk" | embed: "Recent API Trends in Government: API Standards and Open Source Documentation" }}

### "How to Run An Agile Project in Government"

{{ "https://www.youtube-nocookie.com/embed/FpBjClJTVQ0" | embed }}
{{ "https://www.youtube-nocookie.com/embed/FpBjClJTVQ0" | embed: "How to Run An Agile Project in Government" }}
7 changes: 2 additions & 5 deletions _posts/2015-02-10-a-story-of-an-agile-workshop.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ excerpt: "The clock was ticking as I stated the single solitary rule: We will ha

**Responding to change** over following a plan,

*That is, while there is value in the items on the right, we value the
items on the left more.*" — [The Agile
Manifesto](http://www.agilemanifesto.org/)[](http://www.agilemanifesto.org/)
*That is, while there is value in the items on the right, we value the items on the left more.*" — [The Agile Manifesto](http://www.agilemanifesto.org/)

## The stage is set

Expand Down Expand Up @@ -197,8 +195,7 @@ to change.

## Running your own agile workshop

We’ve previously published a guide to running your own [3-Sprint Agile
Workshop](https://18f.gsa.gov/2014/10/21/how-to-run-your-own-3-sprint-agile-workshop/).
We’ve previously published a guide to running your own [3-Sprint Agile Workshop](https://18f.gsa.gov/2014/10/21/how-to-run-your-own-3-sprint-agile-workshop/).

[18F Consulting](https://18f.gsa.gov/consulting/) provides Agile
coaching, modular contracting expertise and technical advice to Federal
Expand Down
Loading

0 comments on commit c8ef502

Please sign in to comment.