Remove unnecessary stage, use the gradlew build outputs

Modify gitlab sast configuration

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head v0.1.1
Taylor Smock 2019-10-11 09:40:21 -06:00
rodzic c80b4445a7
commit f569da2772
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
1 zmienionych plików z 17 dodań i 23 usunięć

Wyświetl plik

@ -12,8 +12,8 @@ cache:
# Various additional Checks # # Various additional Checks #
############################# #############################
include: include:
- template: Code-Quality.gitlab-ci.yml
- template: SAST.gitlab-ci.yml - template: SAST.gitlab-ci.yml
#- template: Code-Quality.gitlab-ci.yml
#- template: Dependency-Scanning.gitlab-ci.yml #- template: Dependency-Scanning.gitlab-ci.yml
#- template: Container-Scanning.gitlab-ci.yml #- template: Container-Scanning.gitlab-ci.yml
#- template: DAST.gitlab-ci.yml #- template: DAST.gitlab-ci.yml
@ -22,6 +22,7 @@ include:
sast: sast:
variables: variables:
GRADLE_PATH: "./gradlew" GRADLE_PATH: "./gradlew"
CI_DEBUG_TRACE: "true"
############### ###############
# Build stage # # Build stage #
@ -75,6 +76,10 @@ build:
artifacts: artifacts:
paths: paths:
- build - build
reports:
junit: build/test-results/test/TEST-*.xml
codequality: build/reports/pmd/main.xml
sast: build/reports/spotbugs/main.html
dependencies: dependencies:
- assemble - assemble
@ -119,17 +124,6 @@ build with java 13:
- assemble with java 13 - assemble with java 13
allow_failure: true allow_failure: true
tests:
stage: test
script:
- ./gradlew check test jacocoTestReport
artifacts:
reports:
junit: build/test-results/test/TEST-*.xml
codequality: build/reports/pmd/main.xml
sast: build/reports/spotbugs/main.html
allow_failure: true
################ ################
# Deploy stage # # Deploy stage #
################ ################
@ -139,7 +133,7 @@ tests:
# stage: deploy # stage: deploy
# environment: # environment:
# name: transifex # name: transifex
# url: https://www.transifex.com/josm/josm/josm-plugin_$CI_PROJECT_NAME # url: https://www.transifex.com/josm/josm/josm-plugin_rapid/
# before_script: # before_script:
# - apt-get update && apt-get install -yq gettext git # - apt-get update && apt-get install -yq gettext git
# - pip install git+https://github.com/transifex/transifex-client.git # - pip install git+https://github.com/transifex/transifex-client.git
@ -148,18 +142,18 @@ tests:
# dependencies: # dependencies:
# - build # - build
# only: # only:
# - master@$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME # - master@smocktaylor/rapid
release: release:
stage: deploy stage: deploy
environment: environment:
name: pages branch / dist directory name: pages branch / dist directory
url: https://gitlab.com/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/tree/pages/public/dist url: https://gitlab.com/smocktaylor/rapid/tree/pages/public/dist
script: script:
- &clone_pages_branch | - &clone_pages_branch |
echo "$SSH_PRIVATE_DEPLOY_KEY" > ~/.ssh/id_rsa echo "$SSH_PRIVATE_DEPLOY_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa
git clone --depth 1 --branch pages git@gitlab.com:$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME.git pages git clone --depth 1 --branch pages git@gitlab.com:smocktaylor/rapid.git pages
- | - |
version=`git describe --always --dirty` version=`git describe --always --dirty`
longVersion=`git describe --always --long --dirty` longVersion=`git describe --always --long --dirty`
@ -172,20 +166,20 @@ release:
- &push_pages_branch | - &push_pages_branch |
cd pages/ cd pages/
git config user.name "Deploy with GitLab CI" git config user.name "Deploy with GitLab CI"
git config user.email "$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME@$CI_SERVER_HOST" git config user.email "smocktaylor/rapid@gitlab.com"
git stage . git stage .
git commit -a -m "$commitMessage" git commit -a -m "$commitMessage"
git push origin pages git push origin pages
dependencies: dependencies:
- build - build
only: only:
- tags@$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME - tags@smocktaylor/rapid
publish master update site: publish master update site:
stage: deploy stage: deploy
environment: environment:
name: pages branch / snapshot update site name: pages branch / snapshot update site
url: https://gitlab.com/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/tree/pages url: https://gitlab.com/smocktaylor/rapid/tree/pages
script: script:
- *clone_pages_branch - *clone_pages_branch
- | - |
@ -200,16 +194,16 @@ publish master update site:
dependencies: dependencies:
- build - build
only: only:
- master@$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME - master@smocktaylor/rapid
publish to / GitLab.com packages: publish to / GitLab.com packages:
stage: deploy stage: deploy
environment: environment:
name: GitLab.com / JOSM-$CI_PROJECT_NAME packages name: GitLab.com / JOSM-rapid packages
url: https://gitlab.com/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/-/packages url: https://gitlab.com/smocktaylor/rapid/-/packages
script: script:
- ./gradlew publishPluginPublicationToGitlabRepository - ./gradlew publishPluginPublicationToGitlabRepository
dependencies: dependencies:
- build - build
only: only:
- tags@$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME - tags@smocktaylor/rapid