diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..f60dfb34 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +@Hygieia/api \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..b39bc35a --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,50 @@ + + +**Affects:** \. + +--- + + + \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..c71403ce --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,53 @@ + + +**Affects:** \. + + +* [Individual Agreement](https://docs.google.com/forms/d/19LpBBjykHPox18vrZvBbZUcK6gQTj7qv1O5hCduAZFU/viewform) +* [Corporate Agreement](https://docs.google.com/forms/d/e/1FAIpQLSeAbobIPLCVZD_ccgtMWBDAcN68oqbAJBQyDTSAQ1AkYuCp_g/viewform?usp=send_form) + +- [ ] I Have signed the CLA + +--- + + + diff --git a/.github/workflows/maven-pr-checks.yml b/.github/workflows/maven-pr-checks.yml new file mode 100755 index 00000000..1aa2537e --- /dev/null +++ b/.github/workflows/maven-pr-checks.yml @@ -0,0 +1,20 @@ +name: Java Compile and Test + +on: + pull_request: + branches: + - master + paths: + - '!**.md' +jobs: + build: + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v1 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Maven + run: mvn test --file pom.xml diff --git a/.github/workflows/maven-snapshot-release.yml b/.github/workflows/maven-snapshot-release.yml new file mode 100755 index 00000000..3bf01e57 --- /dev/null +++ b/.github/workflows/maven-snapshot-release.yml @@ -0,0 +1,22 @@ +name: Release Snapshot + +on: + push: + paths: + - '!README.md' + - '!AuditRules.md' + branches: + - master + +jobs: + build: + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v1 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Release to snapshots repository + run: mvn deploy -q --file pom.xml --settings src/devops/.travis.settings.xml -Denv.OSSRH_USERNAME=${{ secrets.OSSRH_USERNAME }} -Denv.OSSRH_PASSWORD=${{ secrets.OSSRH_PASSWORD }} diff --git a/.sonarcloud.properties b/.sonarcloud.properties deleted file mode 100644 index 7a93b07a..00000000 --- a/.sonarcloud.properties +++ /dev/null @@ -1,15 +0,0 @@ -# Path to sources -#sonar.sources=. -#sonar.exclusions= -#sonar.inclusions= - -# Path to tests -#sonar.tests= -#sonar.test.exclusions= -#sonar.test.inclusions= - -# Source encoding -#sonar.sourceEncoding=UTF-8 - -# Exclusions for copy-paste detection -#sonar.cpd.exclusions= diff --git a/.travis.yml b/.travis.yml index fccf6d99..0cf3086c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,11 @@ language: java jdk: - openjdk8 +services: + - docker branches: only: - - master - - gerrit-integration - "/^v[0-9]+\\.[0-9]+\\.[0-9]+.*$/" install: true @@ -14,9 +14,15 @@ before_script: - sudo chown -R $USER:$GROUP $TRAVIS_BUILD_DIR script: - - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then mvn clean install -q; fi - - if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then cp ./src/devops/deploy-snapshot.sh . && ./deploy-snapshot.sh; fi - if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [[ "$TRAVIS_BRANCH" =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then cp ./src/devops/release.sh . && ./release.sh; fi + - export TAG=$TRAVIS_BRANCH + - export IMAGE_NAME='hygieiadoc/api' + - echo $IMAGE_NAME + - echo $TAG + - docker build -t $IMAGE_NAME . + - docker tag $IMAGE_NAME $IMAGE_NAME:$TAG + - docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASS + - docker push $IMAGE_NAME notifications: webhooks: @@ -30,4 +36,4 @@ notifications: - ragha.vema@capitalone.com - hygieia2@capitalone.com on_success: always - on_failure: always + on_failure: always \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e031404d..82050815 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ ENV PROP_FILE /hygieia/config/application.properties WORKDIR /hygieia -COPY target/*.jar /hygieia +COPY target/*.jar /hygieia/ COPY docker/properties-builder.sh /hygieia/ CMD ./properties-builder.sh &&\ diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 0e9f1504..00000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM docker.io/openjdk:8-jre - -MAINTAINER Hygieia@capitalone.com - -RUN mkdir /hygieia /hygieia/config - -COPY hygieia/ /hygieia -COPY properties-builder.sh /hygieia/ - -WORKDIR /hygieia - -VOLUME ["/hygieia/logs"] - -ENV PROP_FILE /hygieia/config/application.properties - -EXPOSE 8080 -CMD ./properties-builder.sh &&\ - java -Djava.security.egd=file:/dev/./urandom -jar api.jar --spring.config.location=$PROP_FILE \ No newline at end of file