Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #56 from rvema/docker-push
Browse files Browse the repository at this point in the history
Push to Dockerhub
  • Loading branch information
rvema authored Nov 21, 2019
2 parents e1ba73a + 5ba6d8c commit 541c91b
Show file tree
Hide file tree
Showing 9 changed files with 158 additions and 39 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@Hygieia/api
50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
!!! For Security Vulnerabilities, please go to https://gitter.im/capitalone/Hygieia and find
an active team memberl, request their email address, and email directly!!!
-->
**Affects:** \<api-version-number>.

---
<!--
Thanks for taking the time to create an issue. Please read the following:
- Questions should be asked on Stack Overflow.
- For bugs, specify affected versions and explain what you are trying to do.
- For enhancements, provide context and describe the problem.
Issue or Pull Request? Create only one, not both. GitHub treats them as the same.
If unsure, start with an issue, and if you submit a pull request later, the
issue will be closed as superseded.
-->

<!--
Committer Agreememnt.
---------------------
We welcome Your interest in Capital One’s Open Source Projects (the “Project”). Any Contributor to the Project
must accept and sign an Agreement indicating agreement to the license terms below. Except for the license granted
in this Agreement to Capital One and to recipients of software distributed by Capital One, You reserve all
right, title, and interest in and to Your Contributions; this Agreement does not impact Your rights to use Your
own Contributions for any other purpose.
* [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)
This project adheres to the [Open Code of Conduct](https://developer.capitalone.com/single/code-of-conduct/). By
participating, you are expected to honor this code.
-->
53 changes: 53 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
!!! For Security Vulnerabilities, please go to https://gitter.im/capitalone/Hygieia and find
an active team memberl, request their email address, and email directly!!!
-->
**Affects:** \<api-version-number>.


* [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

---
<!--
- For bugs, specify affected versions and explain what you are trying to do.
- For enhancements, provide context and describe the problem.
Issue or Pull Request? Create only one, not both. GitHub treats them as the same.
If unsure, start with an issue, and if you submit a pull request later, the
issue will be closed as superseded.
-->

<!--
Committer Agreememnt.
---------------------
We welcome Your interest in Capital One’s Open Source Projects (the “Project”). Any Contributor to the Project
must accept and sign an Agreement indicating agreement to the license terms below. Except for the license granted
in this Agreement to Capital One and to recipients of software distributed by Capital One, You reserve all
right, title, and interest in and to Your Contributions; this Agreement does not impact Your rights to use Your
own Contributions for any other purpose.
* [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)
This project adheres to the [Open Code of Conduct](https://developer.capitalone.com/single/code-of-conduct/). By
participating, you are expected to honor this code.
-->
20 changes: 20 additions & 0 deletions .github/workflows/maven-pr-checks.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions .github/workflows/maven-snapshot-release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
15 changes: 0 additions & 15 deletions .sonarcloud.properties

This file was deleted.

16 changes: 11 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
language: java
jdk:
- openjdk8
services:
- docker

branches:
only:
- master
- gerrit-integration
- "/^v[0-9]+\\.[0-9]+\\.[0-9]+.*$/"

install: true
Expand All @@ -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:
Expand All @@ -30,4 +36,4 @@ notifications:
- ragha.vema@capitalone.com
- hygieia2@capitalone.com
on_success: always
on_failure: always
on_failure: always
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&\
Expand Down
18 changes: 0 additions & 18 deletions docker/Dockerfile

This file was deleted.

0 comments on commit 541c91b

Please sign in to comment.