Commit 093ed8f3 authored by chickahoona's avatar chickahoona

gitlabci adjustments to work with gitlab.com

parent dcc41452
before_script:
- docker info
- /usr/local/bin/docker-compose -f docker-compose-test.yml kill
- /usr/local/bin/docker-compose -f docker-compose-test.yml rm -f
- /usr/local/bin/docker-compose -f docker-compose-test.yml build
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" registry.gitlab.com
test_image_chrome:
variables:
CONTAINER_TEST_IMAGE: registry.gitlab.com/psono/psono-client:$CI_BUILD_REF_NAME
CONTAINER_RELEASE_IMAGE: registry.gitlab.com/psono/psono-client:latest
stages:
- build
- test
- release
- deploy
job-build-container:
stage: build
image: docker:git
services:
- docker:dind
script:
- docker build -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE
job-run-unittests:
stage: test
image: docker:git
- docker:dind
script:
- /usr/local/bin/docker-compose -f docker-compose-test.yml run password-client-image-test bash -c "(test -e /tmp/.X99-lock || /usr/bin/Xvfb :99 &) && karma start ./unittests/karma-chrome.conf.js"
- /usr/local/bin/docker-compose -f docker-compose-test.yml stop
- docker pull $CONTAINER_TEST_IMAGE
- docker run $CONTAINER_TEST_IMAGE bash -c "(karma start ./unittests/karma-phantom.conf.js"
job-release-docker:
stage: release
image: docker:git
services:
- docker:dind
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
only:
- master
#job-release-artifacts:
# stage: release
# image: docker:git
# services:
# - docker:dind
# script:
# - sh build.sh
# - gulp xpiunsigned
# only:
# - master
job-deploy:
stage: deploy
script:
- ./deploy.sh
only:
- master
#before_script:
# - docker info
# - /usr/local/bin/docker-compose -f docker-compose-test.yml kill
# - /usr/local/bin/docker-compose -f docker-compose-test.yml rm -f
# - /usr/local/bin/docker-compose -f docker-compose-test.yml build
#test_image_chrome:
# script:
# - /usr/local/bin/docker-compose -f docker-compose-test.yml run password-client-image-test bash -c "(test -e /tmp/.X99-lock || /usr/bin/Xvfb :99 &) && karma start ./unittests/karma-chrome.conf.js"
# - /usr/local/bin/docker-compose -f docker-compose-test.yml stop
#
#test_image_firefox:
# script:
# - /usr/local/bin/docker-compose -f docker-compose-test.yml run password-client-image-test bash -c "(test -e /tmp/.X99-lock || /usr/bin/Xvfb :99 &) && karma start ./unittests/karma-firefox.conf.js"
......
FROM ubuntu:14.04
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
MAINTAINER Sascha Pfeiffer <saschapfeiffer@psono.com>
COPY . /root/
WORKDIR /root
RUN apt-get update && \
apt-get install -y nodejs npm xvfb chromium-browser firefox && \
ln -s /usr/bin/nodejs /usr/bin/node && \
npm install && \
npm install gulp -g && \
npm install karma-cli -g && \
npm install coffee-script -g && \
apt-get clean && \
gulp
\ No newline at end of file
RUN sh build.sh
\ No newline at end of file
# License:
TBD
The MIT License (MIT)
Copyright (c) 2016 Sascha Pfeiffer
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:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# Licenses of used software
......@@ -182,7 +202,7 @@
## js-nacl: MIT
Copyright 2013 Tony Garnock-Jones.
Copyright (c) 2013 Tony Garnock-Jones.
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
......
https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials
# PSONO Server - Password Manager
[![build status](https://gitlab.com/psono/psono-client/badges/master/build.svg)](https://gitlab.com/psono/psono-client/commits/master) [![coverage report](https://gitlab.com/psono/psono-client/badges/master/coverage.svg)](https://gitlab.com/psono/psono-client/commits/master)
# Install for "normal" people :D
......
#!/usr/bin/env bash
apt-get update && \
apt-get install -y nodejs npm xvfb chromium-browser firefox && \
ln -s /usr/bin/nodejs /usr/bin/node && \
npm install && \
npm install gulp -g && \
npm install karma-cli -g && \
npm install coffee-script -g && \
apt-get clean && \
gulp
\ No newline at end of file
password-client-image-test:
build: .
environment:
- DISPLAY=:99.0
- CHROME_BIN=/usr/bin/chromium-browser
\ No newline at end of file
......@@ -97,7 +97,7 @@ gulp.task('crx', function() {
return gulp.src('./build/chrome')
.pipe(crx({
privateKey: fs.readFileSync(path.homedir() + '/.password_manager_browser_plugins/certs/key', 'utf8'),
privateKey: fs.readFileSync(path.homedir() + '/.psono_client/certs/key', 'utf8'),
filename: manifest.name + '.crx',
codebase: codebase,
updateXmlFilename: updateXmlFilename
......@@ -123,7 +123,7 @@ gulp.task('xpiunsigned', function (cb) {
* To obtain your api credentials visit https://addons.mozilla.org/en-US/developers/addon/api/key/
*
* create the following file (if not already exist):
* ~/.password_manager_browser_plugins/apikey_addons_mozilla_org/key.json
* ~/.psono_client/apikey_addons_mozilla_org/key.json
*
* As content put the following (replace the values with your api credentials from addons.mozilla.org):
* {
......@@ -142,7 +142,7 @@ gulp.task('xpiunsigned', function (cb) {
*/
gulp.task('xpi', ['xpiunsigned'], function (cb) {
var key = require(path.homedir() + '/.password_manager_browser_plugins/apikey_addons_mozilla_org/key.json');
var key = require(path.homedir() + '/.psono_client/apikey_addons_mozilla_org/key.json');
child_process.exec('jpm sign --api-key '+key.issuer+' --api-secret '+key.secret+' --xpi dist/firefox/psono.PW.unsigned.xpi && mv psonopw*.xpi dist/firefox/psono.PW.xpi', function (err, stdout, stderr) {
console.log(stdout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment