This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 29fd1d67 authored by Eduard Frankford's avatar Eduard Frankford
Browse files

debugging

parent 5cd4b5e0
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
...@@ -8,105 +8,105 @@ cache: &global_cache ...@@ -8,105 +8,105 @@ cache: &global_cache
policy: pull-push policy: pull-push
stages: stages:
- lint # - lint
- build # - build
- test # - test
- release - release
- deploy - deploy
- e2e # - e2e
before_script: before_script:
- export NG_CLI_ANALYTICS="false" - export NG_CLI_ANALYTICS="false"
- export MAVEN_USER_HOME=`pwd`/.maven - export MAVEN_USER_HOME=`pwd`/.maven
pmdCheckstylePrettierLint: # pmdCheckstylePrettierLint:
stage: lint # stage: lint
cache: [] # cache: []
when: always # when: always
script: # script:
- 'export VERSION="6.40.0"' # - 'export VERSION="6.40.0"'
- 'wget "https://github.com/pmd/pmd/releases/download/pmd_releases%2F$VERSION/pmd-bin-$VERSION.zip"' # - 'wget "https://github.com/pmd/pmd/releases/download/pmd_releases%2F$VERSION/pmd-bin-$VERSION.zip"'
- 'jar -xf "pmd-bin-$VERSION.zip"' # - 'jar -xf "pmd-bin-$VERSION.zip"'
- 'chmod u+x "pmd-bin-$VERSION/bin/run.sh"' # - 'chmod u+x "pmd-bin-$VERSION/bin/run.sh"'
- SUCCESS=true # - SUCCESS=true
- echo "Running PMD" # - echo "Running PMD"
- '"pmd-bin-$VERSION/bin/run.sh" pmd -d src/main/java -f textcolor -R pmd_rules.xml 2>&1 | tee pmd.log || SUCCESS=false' # - '"pmd-bin-$VERSION/bin/run.sh" pmd -d src/main/java -f textcolor -R pmd_rules.xml 2>&1 | tee pmd.log || SUCCESS=false'
- echo "Running checkstyle" # - echo "Running checkstyle"
- ./mvnw -ntp checkstyle:check -Dmaven.repo.local=$MAVEN_USER_HOME || SUCCESS=false # - ./mvnw -ntp checkstyle:check -Dmaven.repo.local=$MAVEN_USER_HOME || SUCCESS=false
- echo "Running prettier" # - echo "Running prettier"
- npm install # - npm install
- npm run prettier:check # - npm run prettier:check
- echo "Running eslint" # - echo "Running eslint"
- 'npm run lint | tee lint.log' # - 'npm run lint | tee lint.log'
- "! grep -qE '✖ [0-9]+ problem' lint.log || SUCCESS=false" # - "! grep -qE '✖ [0-9]+ problem' lint.log || SUCCESS=false"
- $SUCCESS # - $SUCCESS
needs: [] # needs: []
artifacts: # artifacts:
when: on_failure # when: on_failure
expire_in: 30 days # expire_in: 30 days
paths: # paths:
- pmd.log # - pmd.log
maven-compile: # maven-compile:
stage: build # stage: build
script: # script:
- ./mvnw -ntp compile -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME # - ./mvnw -ntp compile -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME
artifacts: # artifacts:
paths: # paths:
- target/classes/ # - target/classes/
- target/generated-sources/ # - target/generated-sources/
expire_in: 15 days # expire_in: 15 days
needs: [] # needs: []
cache: [] # cache: []
maven-test: # maven-test:
services: # services:
- docker:20-dind # - docker:20-dind
variables: # variables:
DOCKER_HOST: 'tcp://docker:2375' # DOCKER_HOST: 'tcp://docker:2375'
DOCKER_TLS_CERTDIR: '' # DOCKER_TLS_CERTDIR: ''
stage: test # stage: test
cache: # cache:
# inherit all global cache settings # # inherit all global cache settings
<<: *global_cache # <<: *global_cache
# override the policy # # override the policy
policy: pull # policy: pull
script: # script:
- ./mvnw -ntp verify -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME -Dspring.profiles.active=testcontainers # - ./mvnw -ntp verify -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME -Dspring.profiles.active=testcontainers
allow_failure: true # allow_failure: true
artifacts: # artifacts:
reports: # reports:
junit: # junit:
- target/surefire-reports/TEST-*.xml # - target/surefire-reports/TEST-*.xml
- target/failsafe-reports/TEST-*.xml # - target/failsafe-reports/TEST-*.xml
paths: # paths:
- target/surefire-reports # - target/surefire-reports
- target/failsafe-reports # - target/failsafe-reports
- target/site # - target/site
when: always # when: always
expire_in: 15 days # expire_in: 15 days
needs: [] # needs: []
frontend-test: # frontend-test:
stage: test # stage: test
cache: # cache:
<<: *global_cache # <<: *global_cache
policy: pull # policy: pull
script: # script:
- npm test # - npm test
artifacts: # artifacts:
reports: # reports:
junit: target/test-results/TESTS-results-jest.xml # junit: target/test-results/TESTS-results-jest.xml
paths: # paths:
- target/test-results # - target/test-results
- target/jacoco # - target/jacoco
when: always # when: always
expire_in: 15 days # expire_in: 15 days
needs: [] # needs: []
before_script: # before_script:
- export NG_CLI_ANALYTICS="false" # - export NG_CLI_ANALYTICS="false"
- export MAVEN_USER_HOME=`pwd`/.maven # - export MAVEN_USER_HOME=`pwd`/.maven
- npm ci --cache .npm --prefer-offline # - npm ci --cache .npm --prefer-offline
docker-build: docker-build:
stage: release stage: release
...@@ -149,45 +149,44 @@ deploy: ...@@ -149,45 +149,44 @@ deploy:
script: script:
- ssh contDeploy@codeability-austria -p 1022 "cd gitsearch2/gitsearch && git pull && cd src/main/docker/ && docker pull sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform/gitsearch && GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` COMMIT_ID=`git rev-parse HEAD` SPRING_PROFILES_ACTIVE=staging,swagger docker-compose -f gitsearch.yml up -d --no-deps --build --force-recreate gitsearch-app && exit" - ssh contDeploy@codeability-austria -p 1022 "cd gitsearch2/gitsearch && git pull && cd src/main/docker/ && docker pull sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform/gitsearch && GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` COMMIT_ID=`git rev-parse HEAD` SPRING_PROFILES_ACTIVE=staging,swagger docker-compose -f gitsearch.yml up -d --no-deps --build --force-recreate gitsearch-app && exit"
when: on_success when: on_success
# e2e-test:
# stage: e2e
# cache:
# # inherit all global cache settings
# <<: *global_cache
# # override the policy
# policy: pull
# # only:
# # refs:
# # - development
# services:
# - selenium/standalone-chrome
# dependencies:
# - deploy
# script:
# - npm install
# - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
# - dpkg -i google-chrome*.deb
# - export JHI_E2E_HEADLESS=true
# - export E2E_PASSWORD=$E2E_PASSWORD
# - npm run e2e --host=selenium__standalone-chrome
# when: on_success
e2e-test: # sonar-analyze:
stage: e2e # stage: test
cache: # cache:
# inherit all global cache settings # # inherit all global cache settings
<<: *global_cache # <<: *global_cache
# override the policy # # override the policy
policy: pull # policy: pull
# only: # dependencies:
# refs: # - maven-test
# - development # - frontend-test
services: # script:
- selenium/standalone-chrome # - ./mvnw -ntp org.jacoco:jacoco-maven-plugin:prepare-agent initialize sonar:sonar -Dsonar.organization=codeAbility -Dsonar.host.url=https://qe-sonarqube.uibk.ac.at/ -Dsonar.login=${SONAR_TOKEN_QE} -Dmaven.repo.local=$MAVEN_USER_HOME
dependencies: # # - ./mvnw -ntp org.jacoco:jacoco-maven-plugin:prepare-agent initialize sonar:sonar -Dsonar.organization=codeAbility -Dsonar.host.url=https://server.arctis.at/sonar/ -Dsonar.login=${SONAR_TOKEN} -Dmaven.repo.local=$MAVEN_USER_HOME
- deploy # allow_failure: true
script: # before_script:
- npm install # - export NG_CLI_ANALYTICS="false"
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb # - export MAVEN_USER_HOME=`pwd`/.maven
- dpkg -i google-chrome*.deb # - npm ci --cache .npm --prefer-offline
- export JHI_E2E_HEADLESS=true
- export E2E_PASSWORD=$E2E_PASSWORD
- npm run e2e --host=selenium__standalone-chrome
when: on_success
sonar-analyze:
stage: test
cache:
# inherit all global cache settings
<<: *global_cache
# override the policy
policy: pull
dependencies:
- maven-test
- frontend-test
script:
- ./mvnw -ntp org.jacoco:jacoco-maven-plugin:prepare-agent initialize sonar:sonar -Dsonar.organization=codeAbility -Dsonar.host.url=https://qe-sonarqube.uibk.ac.at/ -Dsonar.login=${SONAR_TOKEN_QE} -Dmaven.repo.local=$MAVEN_USER_HOME
# - ./mvnw -ntp org.jacoco:jacoco-maven-plugin:prepare-agent initialize sonar:sonar -Dsonar.organization=codeAbility -Dsonar.host.url=https://server.arctis.at/sonar/ -Dsonar.login=${SONAR_TOKEN} -Dmaven.repo.local=$MAVEN_USER_HOME
allow_failure: true
before_script:
- export NG_CLI_ANALYTICS="false"
- export MAVEN_USER_HOME=`pwd`/.maven
- npm ci --cache .npm --prefer-offline
...@@ -8,7 +8,6 @@ import org.springframework.stereotype.Repository; ...@@ -8,7 +8,6 @@ import org.springframework.stereotype.Repository;
/** /**
* Spring Data SQL repository for the SavedSearches entity. * Spring Data SQL repository for the SavedSearches entity.
*/ */
@SuppressWarnings("unused")
@Repository @Repository
public interface SavedSearchesRepository extends JpaRepository<SavedSearches, Long> { public interface SavedSearchesRepository extends JpaRepository<SavedSearches, Long> {
@Query("select savedSearches from SavedSearches savedSearches where savedSearches.user.login = ?#{principal.username}") @Query("select savedSearches from SavedSearches savedSearches where savedSearches.user.login = ?#{principal.username}")
......
...@@ -15,7 +15,6 @@ import org.springframework.stereotype.Repository; ...@@ -15,7 +15,6 @@ import org.springframework.stereotype.Repository;
* Spring Data JPA repository for the {@link User} entity. * Spring Data JPA repository for the {@link User} entity.
*/ */
@Repository @Repository
@SuppressWarnings("PMD")
public interface UserRepository extends JpaRepository<User, Long> { public interface UserRepository extends JpaRepository<User, Long> {
String USERS_BY_LOGIN_CACHE = "usersByLogin"; String USERS_BY_LOGIN_CACHE = "usersByLogin";
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment