CICD
This commit is contained in:
1 parent
4bfc8ca68c
commit
902d02f871
1 file changed
+42
@@ -0,0 +1,42 @@
|
|||||||
|
variables:
|
||||||
|
MAVEN_CLI_OPTS: "--batch-mode"
|
||||||
|
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .m2/repository/
|
||||||
|
- frontend/node_modules/
|
||||||
|
|
||||||
|
build_job:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- export PATH=/opt/users/Node.js/bin:$PATH
|
||||||
|
script:
|
||||||
|
- mvn $MAVEN_CLI_OPTS compile
|
||||||
|
artifacts:
|
||||||
|
expire_in: 10 min
|
||||||
|
paths:
|
||||||
|
- target/
|
||||||
|
- "*/target"
|
||||||
|
tags:
|
||||||
|
- shell
|
||||||
|
|
||||||
|
test_job:
|
||||||
|
stage: test
|
||||||
|
before_script:
|
||||||
|
- export PATH=/opt/users/Node.js/bin:$PATH
|
||||||
|
script:
|
||||||
|
- find . -name "*.class" -exec touch {} \+
|
||||||
|
- mvn $MAVEN_CLI_OPTS test
|
||||||
|
tags:
|
||||||
|
- shell
|
||||||
|
|
||||||
|
### cleanup project for security issues
|
||||||
|
cleanup:
|
||||||
|
stage: .post
|
||||||
|
script:
|
||||||
|
- MYDIR=$(pwd) ; rm -rf $MYDIR ; mkdir $MYDIR
|
||||||
|
- cd ; tree -d -L 5
|
||||||
|
when: always
|
||||||
|
tags:
|
||||||
|
- shell
|
||||||
Reference in new issue
Block a user