Skip to content

Commit

Permalink
Split NPM/Docker image repo
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Dec 15, 2018
1 parent 06367ec commit efd3c2e
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 132 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
google-lighthouse-puppeteer-*.tgz
.build
*.yaml
build
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ How to Contribute

This project welcomes your contribution. There are several ways to help out:

* Create an [issue](https://github.com/femtopixel/docker-google-lighthouse-puppeteer/issues/) on GitHub,
* Create an [issue](https://github.com/femtopixel/google-lighthouse-puppeteer/issues/) on GitHub,
if you have found a bug or have an idea for a feature
* Write test cases for open bug issues
* Write patches for open bug/feature issues
Expand All @@ -14,14 +14,14 @@ chance of keeping on top of things.
Issues
------

* Submit an [issue](https://github.com/femtopixel/docker-google-lighthouse-puppeteer/issues/)
* Submit an [issue](https://github.com/femtopixel/google-lighthouse-puppeteer/issues/)
* Make sure it does not already exist.
* Clearly describe the issue including steps to reproduce, when it is a bug.
* Make sure you note the version you use.

Additional Resources
--------------------

* [Existing issues](https://github.com/femtopixel/docker-google-lighthouse-puppeteer/issues/)
* [Existing issues](https://github.com/femtopixel/google-lighthouse-puppeteer/issues/)
* [General GitHub documentation](https://help.github.com/)
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright (c) 2017 FemtoPixel
Copyright (c) 2018 FemtoPixel

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
23 changes: 3 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
VERSION ?= v4.0.0-alpha.2-3.2.1-v1.11.0-0.3.4
VERSION ?= 0.4.0
CACHE ?= --no-cache=1
FULLVERSION ?= v4.0.0-alpha.2-3.2.1-v1.11.0-0.3.4
archs ?= amd64 i386 arm32v7
FULLVERSION ?= 0.4.0
.PHONY: install install-npm publish-npm docker build-docker publish-docker latest version
all: install publish docker
CACHE= make latest
docker: build-docker publish-docker
all: install publish
CACHE= make latest
install:
docker run --rm -v `pwd`:/app -ti -w /app node make install-npm
Expand All @@ -25,17 +22,3 @@ install-npm: clean
npm pack
publish-npm: install-npm
npm login && npm publish
build-docker:
$(foreach arch,$(archs), \
cat Dockerfile | sed -E "s/FROM femtopixel\/google-lighthouse:(.+)/FROM femtopixel\/google-lighthouse:\1-$(arch)/g" > .build; \
docker build -t femtopixel/google-lighthouse-puppeteer:${VERSION}-$(arch) --build-arg VERSION=${VERSION}-$(arch) -f .build ${CACHE} .;\
)
publish-docker:
docker push femtopixel/google-lighthouse-puppeteer
cat manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest2.yaml
cat manifest2.yaml | sed "s/\$$FULLVERSION/${FULLVERSION}/g" > manifest.yaml
manifest-tool push from-spec manifest.yaml
latest: build-docker
cat manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest2.yaml
cat manifest2.yaml | sed "s/\$$FULLVERSION/latest/g" > manifest.yaml
manifest-tool push from-spec manifest.yaml
56 changes: 5 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
![logo](logo.png)

Google Lighthouse Puppeteer - Docker Image
==========================================
Lighthouse Puppeteer - NPM Package
==================================

[![latest release](https://img.shields.io/github/release/femtopixel/docker-google-lighthouse-puppeteer.svg "latest release")](http://github.com/femtopixel/docker-google-lighthouse-puppeteer/releases)
[![latest release](https://img.shields.io/github/release/femtopixel/google-lighthouse-puppeteer.svg "latest release")](http://github.com/femtopixel/google-lighthouse-puppeteer/releases)
[![NPM release](https://img.shields.io/npm/v/google-lighthouse-puppeteer.svg "NPM release")](https://www.npmjs.com/package/google-lighthouse-puppeteer)
[![Docker Pulls](https://img.shields.io/docker/pulls/femtopixel/google-lighthouse-puppeteer.svg)](https://hub.docker.com/r/femtopixel/google-lighthouse-puppeteer/)
[![Docker Stars](https://img.shields.io/docker/stars/femtopixel/google-lighthouse-puppeteer.svg)](https://hub.docker.com/r/femtopixel/google-lighthouse-puppeteer/)
[![Bitcoin donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/btc.png "Bitcoin donation")](https://m.freewallet.org/id/374ad82e/btc)
[![Litecoin donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ltc.png "Litecoin donation")](https://m.freewallet.org/id/374ad82e/ltc)
[![PayPal donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ppl.png "PayPal donation")](https://www.paypal.me/jaymoulin)
Expand All @@ -18,38 +16,10 @@ Google Lighthouse Puppeteer - Docker Image
Description
-----------

The purpose of this image is to produce performance report for several pages in connected mode and in an automated way to be integrated in a CI environment.
The purpose of this package image is to produce performance report for several pages in connected mode and in an automated (programmated) way.

It uses [lighthouse-batch](https://github.com/mikestead/lighthouse-batch) to be able to automate export of multiple
It uses [lighthouse-batch](https://github.com/mikestead/lighthouse-batch) to be able to automate export of multiple

Docker Usage
------------

```
docker run --rm --name perf -it -v /path/to/your/report/folder:/home/chrome/reports -v /path/to/your/testcases/folder:/home/chrome/testcases --cap-add SYS_ADMIN femtopixel/google-lighthouse-puppeteer <name_of_the_test>
```

with `<name_of_the_test>` the name of the test in the `testcases` folder without `.js`

### Example

```
docker run --rm --name perf -it -v /path/to/your/report/folder:/home/chrome/reports -v /path/to/your/testcases/folder:/home/chrome/testcases --cap-add SYS_ADMIN femtopixel/google-lighthouse-puppeteer my_test
```


Docker Usage : Improved
----------------

Using the ever-awesome [Jessie Frazelle](https://twitter.com/jessfraz) SECCOMP profile for Chrome, we don't have to use the hammer that is SYS_ADMIN:

```
wget https://raw.githubusercontent.com/jfrazelle/dotfiles/master/etc/docker/seccomp/chrome.json -O ~/chrome.json
docker run --rm --name perf -it -v /path/to/your/report/folder:/home/chrome/reports -v /path/to/your/testcases/folder:/home/chrome/testcases --security-opt seccomp=$HOME/chrome.json femtopixel/google-lighthouse-puppeteer <name_of_the_test>
```

NodeJS / NPM Package
--------------------
### Installation

```
Expand Down Expand Up @@ -167,19 +137,3 @@ class whateverYouWant

module.exports = new whateverYouWant();
```



FAQ
---

* Using `lighthouse` in authenticated mode : https://github.com/GoogleChrome/lighthouse/blob/master/docs/readme.md#testing-on-a-site-with-authentication
* Error while writing files
```
Runtime error encountered: { Error: EACCES: permission denied, open '/home/chrome/reports/myawesome_site_admin_heavypage.report.json'
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/home/chrome/reports/myawesome_site_admin_heavypage.report.json' }
```
Make sure your folder has the write right for others (`chmod o+w`)
11 changes: 0 additions & 11 deletions entrypoint.sh

This file was deleted.

Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 0 additions & 18 deletions manifest.yml

This file was deleted.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "google-lighthouse-puppeteer",
"version": "0.3.3",
"version": "0.4.0",
"description": "Google Lighthouse Puppeteer is a package to generate reports on multiple urls that allows or not authentication",
"main": "lighthouse-puppeteer.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/femtopixel/docker-google-lighthouse-puppeteer.git"
"url": "git+https://github.com/femtopixel/google-lighthouse-puppeteer.git"
},
"keywords": [
"google",
Expand All @@ -21,13 +21,13 @@
"dependencies": {
"command-line-args": "^4.0.7",
"command-line-usage": "^4.0.1",
"lighthouse-batch": "^2.1.0",
"lighthouse-batch": "^3.0.0",
"puppeteer": "^0.13.0"
},
"author": "Jay MOULIN <[email protected]> (https://jaymoulin.github.io)",
"license": "MIT",
"bugs": {
"url": "https://github.com/femtopixel/docker-google-lighthouse-puppeteer/issues"
"url": "https://github.com/femtopixel/google-lighthouse-puppeteer/issues"
},
"homepage": "https://github.com/femtopixel/docker-google-lighthouse-puppeteer#readme"
"homepage": "https://github.com/femtopixel/google-lighthouse-puppeteer#readme"
}

0 comments on commit efd3c2e

Please sign in to comment.