Skip to content

Commit

Permalink
add release-message job & move tests before releases & create build job
Browse files Browse the repository at this point in the history
  • Loading branch information
Éloïs committed Jan 10, 2018
1 parent 560bf7e commit 9ff581e
Showing 1 changed file with 36 additions and 12 deletions.
48 changes: 36 additions & 12 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ stages:
- github-sync
- build
- test
- release
- release-message

push_to_github:
stage: github-sync
Expand All @@ -20,9 +22,30 @@ push_to_github:
- bash -c "cat packed-refs | grep -v 'refs/pull' > packed-refs-new; echo 'Removed pull refs.'"
- mv packed-refs-new packed-refs
- bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"

build_linux:test:
build:
stage: build
tags:
- redshift
before_script:
- export NVM_DIR="$HOME/.nvm"
- . "$NVM_DIR/nvm.sh"
script:
- yarn

test:
stage: test
tags:
- redshift
before_script:
- export NVM_DIR="$HOME/.nvm"
- . "$NVM_DIR/nvm.sh"
script:
- yarn
- yarn test

release_linux:test:
stage: release
image: duniter/release-builder:v1.0.1
tags:
- redshift-duniter-builder
Expand All @@ -35,8 +58,8 @@ build_linux:test:
except:
- tags

build_linux:deploy:
stage: build
release_linux:deploy:
stage: release
image: duniter/release-builder:v1.0.1
tags:
- redshift-duniter-builder
Expand All @@ -47,14 +70,15 @@ build_linux:deploy:
- work/bin/
only:
- tags

test:
stage: test
enforce-message:
stage: release-message
tags:
- redshift
before_script:
- export NVM_DIR="$HOME/.nvm"
- . "$NVM_DIR/nvm.sh"
variables:
JOB_ARTIFACTS: 'build'
EXPECTED_ARTIFACTS: '["duniter-desktop-${CI_COMMIT_TAG}-linux-x64.deb","duniter-desktop-${CI_COMMIT_TAG}-linux-x64.tar.gz","duniter-server-${CI_COMMIT_TAG}-linux-x64.deb"]'
script:
- yarn
- yarn test
- python3 .gitlab/releaser.py
only:
- tags

0 comments on commit 9ff581e

Please sign in to comment.