File tree 6 files changed +76
-25
lines changed
6 files changed +76
-25
lines changed Original file line number Diff line number Diff line change
1
+ name : Java Compile and Test
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - master
7
+ paths :
8
+ - ' !**.md'
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-18.04
12
+
13
+ steps :
14
+ - uses : actions/checkout@v1
15
+ - name : Set up JDK 1.8
16
+ uses : actions/setup-java@v1
17
+ with :
18
+ java-version : 1.8
19
+ - name : Build with Maven
20
+ run : mvn test --file pom.xml
Original file line number Diff line number Diff line change
1
+ name : Release Snapshot
2
+
3
+ on :
4
+ push :
5
+ paths :
6
+ - ' !README.md'
7
+ - ' !AuditRules.md'
8
+ branches :
9
+ - master
10
+
11
+ jobs :
12
+ build :
13
+ runs-on : ubuntu-18.04
14
+
15
+ steps :
16
+ - uses : actions/checkout@v1
17
+ - name : Set up JDK 1.8
18
+ uses : actions/setup-java@v1
19
+ with :
20
+ java-version : 1.8
21
+ - name : Release to snapshots repository
22
+ 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 }}
Original file line number Diff line number Diff line change 1
1
language : java
2
2
jdk :
3
3
- openjdk8
4
+ services :
5
+ - docker
4
6
5
7
branches :
6
8
only :
7
- - master
8
- - gerrit-integration
9
9
- " /^v[0-9]+\\ .[0-9]+\\ .[0-9]+.*$/"
10
10
11
11
install : true
@@ -14,9 +14,15 @@ before_script:
14
14
- sudo chown -R $USER:$GROUP $TRAVIS_BUILD_DIR
15
15
16
16
script :
17
- - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then mvn clean install -q; fi
18
- - if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then cp ./src/devops/deploy-snapshot.sh . && ./deploy-snapshot.sh; fi
19
17
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [[ "$TRAVIS_BRANCH" =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then cp ./src/devops/release.sh . && ./release.sh; fi
18
+ - export TAG=$TRAVIS_BRANCH
19
+ - export IMAGE_NAME='hygieiadoc/apiaudit'
20
+ - echo $IMAGE_NAME
21
+ - echo $TAG
22
+ - docker build -t $IMAGE_NAME .
23
+ - docker tag $IMAGE_NAME $IMAGE_NAME:$TAG
24
+ - docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASS
25
+ - docker push $IMAGE_NAME
20
26
21
27
notifications :
22
28
webhooks :
Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ VOLUME ["/hygieia/logs"]
4
4
5
5
RUN mkdir /hygieia/config
6
6
7
- EXPOSE 8080
7
+ EXPOSE 8081
8
8
9
9
ENV PROP_FILE /hygieia/config/application.properties
10
10
11
11
WORKDIR /hygieia
12
12
13
- COPY target/*.jar /hygieia
13
+ COPY target/*.jar /hygieia/
14
14
COPY docker/properties-builder.sh /hygieia/
15
15
16
16
CMD ./properties-builder.sh &&\
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <settings xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
+ xmlns =" http://maven.apache.org/SETTINGS/1.0.0"
4
+ xsi : schemaLocation =" http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" >
5
+
6
+ <servers >
7
+ <server >
8
+ <id >ossrh</id >
9
+ <username >${env.OSSRH_USERNAME}</username >
10
+ <password >${env.OSSRH_PASSWORD}</password >
11
+ </server >
12
+ </servers >
13
+ <profiles >
14
+ <profile >
15
+ <id >release</id >
16
+ <properties >
17
+ <gpg .keyname>${env.GPG_KEYNAME}}</gpg .keyname>
18
+ <gpg .passphrase>${env.GPG_PASSPHRASE}</gpg .passphrase>
19
+ </properties >
20
+ </profile >
21
+ </profiles >
22
+ </settings >
You can’t perform that action at this time.
0 commit comments