-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
317 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
stages: | ||
- test | ||
- name: dockerbuild | ||
if: branch = master | ||
|
||
# provide PROJECT_NAME environment variable if you extend this template | ||
.node-unit-test: &node-unit-test | ||
stage: test | ||
language: node_js | ||
node_js: | ||
- "10" | ||
cache: npm | ||
script: | ||
- cd $PROJECT_NAME | ||
- npm ci | ||
- npm test | ||
|
||
# provide PROJECT_NAME environment variable if you extend this template | ||
.docker-build: &docker-build | ||
stage: dockerbuild | ||
language: minimal | ||
services: | ||
- docker | ||
before_script: | ||
- export BUILDTIMESTAMP=$(date -Iseconds) | ||
- export TAG=trubudget/$PROJECT_NAME:$TRAVIS_BRANCH | ||
# - docker pull $TAG|| true | ||
script: | ||
- cd $PROJECT_NAME | ||
- docker build --build-arg BUILDTIMESTAMP=$BUILDTIMESTAMP --build-arg CI_COMMIT_SHA=$TRAVIS_COMMIT --tag $TAG -f Dockerfile . | ||
# - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
# - docker push $TAG | ||
|
||
jobs: | ||
include: | ||
- <<: *node-unit-test | ||
env: PROJECT_NAME=blockchain | ||
- <<: *node-unit-test | ||
env: PROJECT_NAME=api | ||
- <<: *node-unit-test | ||
env: PROJECT_NAME=frontend | ||
- <<: *docker-build | ||
env: PROJECT_NAME=blockchain | ||
- <<: *docker-build | ||
env: PROJECT_NAME=api | ||
- <<: *docker-build | ||
env: PROJECT_NAME=frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.