Skip to content

Commit

Permalink
Updated of gitlab ci for pages
Browse files Browse the repository at this point in the history
  • Loading branch information
guibaldissera committed May 27, 2018
1 parent 322647d commit d868326
Showing 1 changed file with 70 additions and 71 deletions.
141 changes: 70 additions & 71 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,76 +11,57 @@ before_script:

# GitLab CI Stages executed in this CI
stages:
# - test
- test
- build
# - deploy
- deploy

# Static Analysis for avaliate code smells
# static_analysis:
# stage: test
# before_script:
# - cd project/
# - mv ../docker/static_analysis.sh ./static_analysis.sh
# - chmod +x ./static_analysis.sh
# script:
# - ./static_analysis.sh

# # Run Unit Tests, verifying the code coverage
# unit_test:
# stage: test
# before_script:
# - cd project/
# - mv ../docker/test.sh ./test.sh
# - chmod +x ./test.sh
# script:
# - ./test.sh
# artifacts:
# name: "reports_${CI_PROJECT_NAME}_${CI_BUILD_REF_NAME}_unit_test"
# when: always
# expire_in: 2 days
# paths:
# - project/app/build/reports/jacocoTestReport/html
static_analysis:
stage: test
before_script:
- cd project/
- mv ../docker/static_analysis.sh ./static_analysis.sh
- chmod +x ./static_analysis.sh
script:
- ./static_analysis.sh

# # Build script for generate new .APK
# build:
# stage: build
# before_script:
# - cd project/
# - git clone $KEY_STORE_REPO ./key
# - mv ./key/$STORE_FILE ./app/
# - mv ../docker/build.sh ./build.sh
# - chmod +x ./build.sh
# script:
# - fastlane update_build_number
# - ./build.sh
# after_script:
# - rm -Rf ./app/.git/
# - rm ./app/$STORE_FILE
# artifacts:
# paths:
# - project/app/build/outputs/apk
# only:
# - tags
# - dev
# # - master
# Run Unit Tests, verifying the code coverage
unit_test:
stage: test
before_script:
- cd project/
- mv ../docker/test.sh ./test.sh
- chmod +x ./test.sh
script:
- ./test.sh
artifacts:
name: "reports_${CI_PROJECT_NAME}_${CI_BUILD_REF_NAME}_unit_test"
when: always
expire_in: 2 days
paths:
- project/app/build/reports/jacocoTestReport/html

# # Deploy to PlayStore in Beta Version
# deploy_beta:
# stage: deploy
# before_script:
# - cd project/
# - echo $DEPLOY_KEY_FILE >> key.json
# script:
# - fastlane beta
# after_script:
# - rm key.json
# dependencies:
# - build
# artifacts:
# paths:
# - fastlane/logs
# only:
# - tags
# Build script for generate new .APK
build:
stage: build
before_script:
- cd project/
- git clone $KEY_STORE_REPO ./key
- mv ./key/$STORE_FILE ./app/
- mv ../docker/build.sh ./build.sh
- chmod +x ./build.sh
script:
- fastlane update_build_number
- ./build.sh
after_script:
- rm -Rf ./app/.git/
- rm ./app/$STORE_FILE
artifacts:
paths:
- project/app/build/outputs/apk
only:
- tags
- dev

# Build of GitHub Pages
pages:
Expand All @@ -93,11 +74,29 @@ pages:
- git add site/
- git commit -m"Build new Pages with $CI_PIPELINE_ID"
- git push https://$GITHUB_USERNAME:[email protected]/fga-gpp-mds/2018.1_Nexte.git `git subtree split --prefix site/`:gh-pages --force
# only:
# - dev
only:
- dev

# Deploy to PlayStore in Beta Version
deploy_beta:
stage: deploy
before_script:
- cd project/
- echo $DEPLOY_KEY_FILE >> key.json
script:
- fastlane beta
after_script:
- rm key.json
dependencies:
- build
artifacts:
paths:
- fastlane/logs
only:
- tags

# Cache for use on next executions
# cache:
# key: ${CI_PROJECT_ID}2
# paths:
# - .gradle/
cache:
key: ${CI_PROJECT_ID}2
paths:
- .gradle/

0 comments on commit d868326

Please sign in to comment.