Builds and deploys Docker image via Travis on commit
This commit is contained in:
parent
7eb1a8a856
commit
67282780a3
|
@ -0,0 +1,49 @@
|
|||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events*.json
|
||||
speed-measure-plugin*.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# SonarCloud
|
||||
/.scannerwork/
|
|
@ -0,0 +1,32 @@
|
|||
sudo: required
|
||||
|
||||
dist: bionic
|
||||
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- 12
|
||||
|
||||
python:
|
||||
- "3.7"
|
||||
|
||||
services:
|
||||
- docker
|
||||
- xvfb
|
||||
|
||||
script:
|
||||
- npm install
|
||||
|
||||
deploy:
|
||||
provider: script
|
||||
script: bash ./deploy.sh
|
||||
on:
|
||||
all_branches: true
|
||||
condition: $TRAVIS_BRANCH =~ ^(dev|testing|demo|training|staging|master|rrt\/.*)$
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: change
|
||||
on_failure: always
|
||||
recipients:
|
||||
- dan@sartography.com
|
|
@ -0,0 +1,11 @@
|
|||
FROM node AS builder
|
||||
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
|
||||
ADD package.json /app/
|
||||
ADD package-lock.json /app/
|
||||
|
||||
COPY . /app/
|
||||
|
||||
RUN npm install
|
|
@ -1 +1,2 @@
|
|||
cr-connect-angular-base
|
||||
# cr-connect-angular-base
|
||||
Installs dependencies for angular projects
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
function branch_to_tag () {
|
||||
if [ "$1" == "master" ]; then echo "latest"; else echo "$1" ; fi
|
||||
}
|
||||
|
||||
REPO="sartography/cr-connect-angular-base"
|
||||
TAG=$(branch_to_tag "$TRAVIS_BRANCH")
|
||||
|
||||
echo "REPO = $REPO"
|
||||
echo "TAG = $TAG"
|
||||
|
||||
# Build and push Docker image to Docker Hub
|
||||
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin || exit 1
|
||||
docker build -f Dockerfile -t "$REPO:$TAG" . || exit 1
|
||||
docker push "$REPO" || exit 1
|
||||
|
||||
# Wait for Docker Hub
|
||||
echo "Publishing to Docker Hub..."
|
||||
sleep 30
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"name": "cr-connect-frontend",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~9.0.2",
|
||||
"@angular/cdk": "^9.2.1",
|
||||
"@angular/common": "~9.0.2",
|
||||
"@angular/compiler": "~9.0.2",
|
||||
"@angular/core": "~9.0.2",
|
||||
"@angular/flex-layout": "^9.0.0-beta.29",
|
||||
"@angular/forms": "~9.0.2",
|
||||
"@angular/material": "^9.1.0",
|
||||
"@angular/platform-browser": "~9.0.2",
|
||||
"@angular/platform-browser-dynamic": "~9.0.2",
|
||||
"@angular/router": "~9.0.2",
|
||||
"@ngx-formly/core": "^5.5.13",
|
||||
"@ngx-formly/material": "^5.5.13",
|
||||
"@ngx-progressbar/core": "^5.3.2",
|
||||
"@sentry/browser": "^5.16.1",
|
||||
"@yellowspot/ng-truncate": "^1.5.1",
|
||||
"chart.js": "^2.9.3",
|
||||
"ng2-charts": "^2.3.0",
|
||||
"ngx-device-detector": "^1.3.20",
|
||||
"ngx-file-drop": "^8.0.8",
|
||||
"ngx-highlightjs": "^4.1.0-beta",
|
||||
"ngx-markdown": "^9.0.0",
|
||||
"ngx-page-scroll": "^7.0.0",
|
||||
"ngx-page-scroll-core": "^7.0.0",
|
||||
"rfdc": "^1.1.4",
|
||||
"rxjs": "~6.5.4",
|
||||
"sartography-workflow-lib": "0.0.265",
|
||||
"ts-md5": "^1.2.7",
|
||||
"tslib": "^1.10.0",
|
||||
"zone.js": "~0.10.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^0.901.7",
|
||||
"@angular/cli": "~9.0.3",
|
||||
"@angular/compiler-cli": "~9.0.2",
|
||||
"@angular/language-service": "~9.0.2",
|
||||
"@types/jasmine": "~3.5.7",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "^12.11.1",
|
||||
"codelyzer": "^5.1.2",
|
||||
"jasmine-core": "~3.5.0",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~4.4.1",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage-istanbul-reporter": "~2.1.1",
|
||||
"karma-jasmine": "~3.1.1",
|
||||
"karma-jasmine-html-reporter": "^1.4.0",
|
||||
"protractor": "~5.4.0",
|
||||
"protractor-http-client": "^1.0.4",
|
||||
"sonar-scanner": "^3.1.0",
|
||||
"ts-node": "~8.6.2",
|
||||
"tslint": "~6.0.0",
|
||||
"typescript": "~3.7.5"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue