-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into sgandon/fix_touch_timeout
- Loading branch information
Showing
35 changed files
with
236 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Build Snapshot | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'release-*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
cache: maven | ||
- name: Build | ||
run: mvn clean package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'release-*' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
ALTERNATE_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} | ||
IMAGE_NAME: ${{ github.repository }} | ||
SONAR_URL: https://sonarcloud.io | ||
SONAR_ORG: grrolland-github | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get tag name | ||
id: get_tag_name | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/heads\/release-/} | ||
|
||
## | ||
# Perform Maven Release | ||
# | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
cache: maven | ||
- name: Configure Git user | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Actions" | ||
- name: Perform Release | ||
run: mvn -B -Dtag=${GITHUB_REF##*release-} release:prepare release:perform | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
## | ||
# Checkout and Build the Tag | ||
# | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ steps.get_tag_name.outputs.VERSION }} | ||
|
||
- name: Build Tag | ||
run: | | ||
mvn clean \ | ||
org.jacoco:jacoco-maven-plugin:prepare-agent \ | ||
package \ | ||
org.jacoco:jacoco-maven-plugin:report \ | ||
sonar:sonar \ | ||
-B -e -V \ | ||
-Dsonar.host.url=$SONAR_URL \ | ||
-Dsonar.login=$SONAR_TOKEN \ | ||
-Dsonar.organization=$SONAR_ORG \ | ||
-Dsonar.sources=src/main \ | ||
-Dsonar.junit.reportPaths=target/surefire-reports \ | ||
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
## | ||
# Publish to Github Docker Registry | ||
# | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
${{ steps.get_tag_name.outputs.VERSION }} | ||
latest | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
## | ||
# Publish to Alternate Docker Registry | ||
# | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: ${{ env.ALTERNATE_REGISTRY }} | ||
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | ||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta_alt | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: ${{ env.ALTERNATE_REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
${{ steps.get_tag_name.outputs.VERSION }} | ||
latest | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta_alt.outputs.tags }} | ||
labels: ${{ steps.meta_alt.outputs.labels }} | ||
|
||
## | ||
# Create a Github Release | ||
# | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
body: Release version ${{ steps.get_tag_name.outputs.VERSION }} | ||
tag: ${{ steps.get_tag_name.outputs.VERSION }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
13 changes: 0 additions & 13 deletions
13
.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_11.xml
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_11.xml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_25.xml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
docker login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io | ||
export TAG=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi) | ||
export IMAGE_NAME=quay.io/grrolland/ngx-distributed-shm | ||
docker build -f Dockerfile -t $IMAGE_NAME:$TAG . | ||
docker push $IMAGE_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
FROM maven:3.6.3-jdk-11 AS build | ||
FROM eclipse-temurin:11-alpine | ||
|
||
RUN git clone https://github.com/revomatico/ngx-distributed-shm | ||
RUN cd ngx-distributed-shm \ | ||
&& mvn clean package | ||
|
||
FROM openjdk:11-jre-slim | ||
|
||
LABEL maintainer="Cristian Chiru <[email protected]>" | ||
LABEL maintainer="Grégoire Rolland <[email protected]>" | ||
|
||
ENV NGX_DISTRIBUTED_SHM_PORT=4321 \ | ||
NGX_DISTRIBUTED_SHM_ADDRESS=0.0.0.0 | ||
|
||
COPY --from=build /ngx-distributed-shm/target/ngx-distributed-shm.jar / | ||
NGX_DISTRIBUTED_SHM_ADDRESS=0.0.0.0 \ | ||
JDK_JAVA_OPTIONS="--add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED" | ||
|
||
STOPSIGNAL SIGRTMIN+3 | ||
COPY target/ngx-distributed-shm.jar / | ||
|
||
EXPOSE 4321 | ||
|
||
ENTRYPOINT java -Dngx-distributed-shm.port=${NGX_DISTRIBUTED_SHM_PORT} -Dngx-distributed-shm.bind_address=${NGX_DISTRIBUTED_SHM_ADDRESS} -jar ngx-distributed-shm.jar | ||
ENTRYPOINT java -Dhazelcast.shutdownhook.policy=GRACEFUL \ | ||
-Dhazelcast.graceful.shutdown.max.wait=20 \ | ||
-Dngx-distributed-shm.port=${NGX_DISTRIBUTED_SHM_PORT} \ | ||
-Dngx-distributed-shm.bind_address=${NGX_DISTRIBUTED_SHM_ADDRESS} \ | ||
-jar ngx-distributed-shm.jar |
Oops, something went wrong.