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

Commit

Permalink
Merge pull request #35 from scalecube/develop
Browse files Browse the repository at this point in the history
New master
  • Loading branch information
artem-v authored Sep 17, 2020
2 parents c5d1617 + 2f07c80 commit 80a3904
Show file tree
Hide file tree
Showing 19 changed files with 251 additions and 355 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Auto detect text files and perform LF normalization
* text=auto
*.txt text
*.sh text eol=lf
*.html text eol=lf diff=html
*.css text eol=lf
*.js text eol=lf
*.jpg -text
*.pdf -text
*.java text diff=java
4 changes: 4 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
template: |
## What’s Changed
$CHANGES
37 changes: 37 additions & 0 deletions .github/workflows/feature-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Feature Branch CI

on:
push:
paths-ignore:
- '.github/workflows/**'
- 'README.md'
branches-ignore:
- 'master'
- 'develop'
- 'release*'

jobs:
build:
name: Feature Branch CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Maven Build
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -Ddockerfile.skip=true -B -V
env:
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
- name: Maven Verify
run: mvn verify -B
64 changes: 64 additions & 0 deletions .github/workflows/master-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Master branch CI

on:
push:
branches:
- 'master'

jobs:
build:
name: Master Branch CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Maven Build
run: mvn clean install -DskipTests=true -Ddockerfile.skip=true -B -V
env:
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
- name: Maven Verify
run: mvn verify -B
- name: Configure git
run: |
echo "Git checkout branch ${GITHUB_REF##*/}, commit ${GITHUB_SHA} was pushed by ${GITHUB_ACTOR}"
git checkout ${GITHUB_REF##*/}
echo "Git reset hard to ${GITHUB_SHA}"
git reset --hard ${GITHUB_SHA}
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
- name: Prepare release
id: prepare_release
run: |
mvn --batch-mode build-helper:parse-version release:prepare -P release \
-DreleaseVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion} \
-DdevelopmentVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT \
-DautoVersionSubmodules=true -Darguments="-DskipTests=true"
echo ::set-output name=release_tag::$(git describe --tags --abbrev=0)
- name: Perform release
run: mvn --batch-mode release:perform -P release -Darguments="-DskipTests=true -Ddocker.image.extra-tag=master"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
- name: Rollback release
if: failure()
run: |
mvn release:rollback || echo "nothing to rollback"
if [ ! -z "${{ steps.prepare_release.outputs.release_tag }}" ]
then
git tag -d ${{ steps.prepare_release.outputs.release_tag }}
git push origin :refs/tags/${{ steps.prepare_release.outputs.release_tag }}
fi
38 changes: 38 additions & 0 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release CI

on:
release:
types: [published]

jobs:
build:
name: Release CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Deploy release version
run: |
# `tag` is the concatenation of `v` and a version by the tag convention.
release_version=$(echo ${{ github.event.release.tag_name }} | sed "s/v//")
echo Release version $release_version
mvn versions:set -DnewVersion=$release_version -DgenerateBackupPoms=false
mvn versions:commit
mvn clean deploy -B -V
env:
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }}
- name: Rollback release (remove tag)
if: failure()
run: git push origin :refs/tags/${{ github.event.release.tag_name }}
47 changes: 13 additions & 34 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,13 @@
# Eclipse project files
.project
.classpath
.settings

# IntelliJ IDEA project files and directories
*.iml
*.ipr
*.iws
.idea/

# Geany project file
.geany

# KDevelop project file and directory
.kdev4/
*.kdev4

# Build targets
/target
*/target

# Report directories
/reports
*/reports

# Mac-specific directory that no other operating system needs.
.DS_Store

# JVM crash logs
hs_err_pid*.log

*.log
*.csv
.*
!.gitignore
!.gitattributes
!.github
!.editorconfig
!.*.yml
!.env.example
**/target/
*.iml
**/logs/*.log
*.db
*.csv
*.log
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends: default
rules:
document-start:
present: false
truthy: disable
comments:
min-spaces-from-content: 1
line-length:
max: 150
braces:
min-spaces-inside: 0
max-spaces-inside: 0
brackets:
min-spaces-inside: 0
max-spaces-inside: 0
indentation:
indent-sequences: consistent
46 changes: 0 additions & 46 deletions CODE_OF_CONDUCT.md

This file was deleted.

65 changes: 59 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,81 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.scalecube</groupId>
<artifactId>scalecube-parent-pom</artifactId>
<version>0.0.17</version>
<version>0.2.1</version>
</parent>

<artifactId>scalecube-app-utils</artifactId>
<version>0.0.8-SNAPSHOT</version>

<name>ScaleCube Application Utils</name>

<repositories>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/scalecube/packages</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/scalecube/scalecube-package-utils</url>
</repository>
</distributionManagement>

<scm>
<url>https://github.com/scalecube/scalecube-app-utils</url>
<connection>scm:git:git@github.com:scalecube/scalecube-app-utils.git</connection>
<developerConnection>scm:git:git@github.com:scalecube/scalecube-app-utils.git
<url>https://github.com/scalecube/scalecube-package-utils</url>
<connection>scm:git:https://github.com/scalecube/scalecube-package-utils.git</connection>
<developerConnection>scm:git:https://github.com/scalecube/scalecube-package-utils.git
</developerConnection>
<tag>HEAD</tag>
</scm>

<properties>
<junit.version>5.1.1</junit.version>
<mockito.version>2.24.5</mockito.version>
<hamcrest.version>1.3</hamcrest.version>
</properties>

<dependencies>
<!-- Test scope -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -46,4 +98,5 @@
</testResource>
</testResources>
</build>

</project>
Loading

0 comments on commit 80a3904

Please sign in to comment.