Unverified Commit f7849b6d authored by Khalid Ali's avatar Khalid Ali Committed by GitHub
Browse files

Merge pull request #1 from khalludi/feature/9-add-gitlab-ci

Feature/9-Add-Travis-CI
parents 494aefea da3a1232
......@@ -45,6 +45,7 @@ cmake-build-*/
# IntelliJ
out/
build/
.env
# mpeltonen/sbt-idea plugin
.idea_modules/
......
image: java:8
before_script:
- apt-get update -qq && apt-get install -y -qq git
- git config --global user.email "kali21@masonlive.gmu.edu"
- git config --global user.name "Khalid Ali"
sonarqube_master_job:
stage: test
only:
- master
script:
- ./gradlew sonarqube -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.organization=$SONAR_ORG -Dsonar.projectKey=$SONAR_PROJECT_KEY
sonarqube_preview_feature_job:
stage: test
only:
- /^feature\/*/
script:
- git checkout origin/master
- git merge $CI_COMMIT_SHA --no-commit --no-ff
- ./gradlew sonarqube -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.organization=$SONAR_ORG -Dsonar.projectKey=$SONAR_PROJECT_KEY -Dsonar.analysis.mode=preview -Dsonar.gitlab.commit_sha=$CI_BUILD_REF -Dsonar.gitlab.ref=$CI_BUILD_REF_NAME -Dsonar.gitab.project_id=$CI_PROJECT_ID
\ No newline at end of file
language: java
sudo: false
install: true
jdk:
- oraclejdk8
addons:
sonarcloud:
organization: "khalludi-github" # the key of the org you chose at step #3
token:
secure: $SONAR_LOGIN # encrypted value of your token
script:
# other script steps
- ./gradlew sonarqube
\ No newline at end of file
......@@ -12,10 +12,7 @@ buildscript {
plugins {
id "org.flywaydb.flyway" version "5.2.4"
}
plugins {
id "org.sonarqube" version "2.6"
id "org.sonarqube" version "2.7"
}
apply plugin: 'jacoco'
......
package com.gmu.bookshare;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class BookshareApplicationTests {
@Test
public void contextLoads() {
}
}
Markdown is supported
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