Skip to content

Commit

Permalink
build(GithubActions): setup Github Actions (#4)
Browse files Browse the repository at this point in the history
* Plug sonarcloud
* Remove internal Jenkins infra
* Update project dependencies + structure
  • Loading branch information
rbioteau authored Jul 1, 2020
1 parent 4dd9dac commit d4989a1
Show file tree
Hide file tree
Showing 31 changed files with 676 additions and 374 deletions.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11

- name: Build and test
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
run: ./mvnw -B clean verify sonar:sonar -Dsonar.login=${{ secrets.SONAR_TOKEN }}
- run: mkdir staging && cp target/*.zip staging
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: Connectors
path: staging
19 changes: 19 additions & 0 deletions .github/workflows/commit-message-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Commit Message Check'
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check Commit Type
uses: gsactions/commit-message-checker@v1
with:
pattern: '^\S+\((.+)\):\s(.+)$'
flags: 'gm'
error: 'Your first line has to matches the following pattern: type(category): description [flags], where flags is an optional coma separated list. Check the contributing guidlines for more details.'
59 changes: 59 additions & 0 deletions .github/workflows/createRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Create release

on:
push:
branches:
- release-*

jobs:
build:
name: Release pipeline
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11

- name: Extract version
shell: bash
run: echo "##[set-output name=version;]$(echo ${GITHUB_REF#refs/heads/} | sed 's/release-//g')"
id: extract_version

- name: changelog
uses: scottbrenner/generate-changelog-action@master
id: Changelog
env:
REPO: ${{ github.repository }}

- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.extract_version.outputs.version }}
release_name: Release ${{ steps.extract_version.outputs.version }}
body: |
${{ steps.Changelog.outputs.changelog }}
draft: false
prerelease: false

- name: Build Release
run: ./mvnw -B verify

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: target/bonita-connector-uipath-${{ steps.extract_version.outputs.version }}-all.zip
asset_name: bonita-connector-uipath-${{ steps.extract_version.outputs.version }}-all.zip
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## Contributing

We are pleased to receive any kind of contribution (issues, pull requests, suggestions ...).

#### Commit message format

Here is the expected commit format, please respect it, we rely on it to [automatically generate the changelog](https://github.com/lob/generate-changelog#usage):

```
type(category): description [flags]
< commit description >
```

Where `type` is one of the following:

- `breaking`
- `build`
- `ci`
- `chore`
- `docs`
- `feat`
- `fix`
- `other`
- `perf`
- `refactor`
- `revert`
- `style`
- `test`

Where `flags` is an optional comma-separated list of one or more of the following (must be surrounded in square brackets):

- `breaking`: alters `type` to be a breaking change

And `category` can be anything of your choice. If you use a type not found in the list (but it still follows the same format of the message), it'll be grouped under `other`.

#### Tests

Ensure that your contribution is correctly tested:

- Any update on the generated project must be tested through the generated unit tests
- Any update on the archetype must be tested through the integration test suite (*src/test/resources/projects*)
22 changes: 0 additions & 22 deletions Jenkinsfile

This file was deleted.

15 changes: 0 additions & 15 deletions README.MD

This file was deleted.

25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# UIPath Connector

![](https://github.com/bonitasoft/bonita-connector-uipath/workflows/Build/badge.svg)
[![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=bonitasoft_bonita-connector-uipath&metric=alert_status)](https://sonarcloud.io/dashboard?id=bonitasoft_bonita-connector-uipath)
[![GitHub version](https://badge.fury.io/gh/bonitasoft%2Fbonita-connector-uipath.svg)](https://badge.fury.io/gh/bonitasoft%2Fbonita-connector-uipath)

## Build

__Clone__ or __fork__ this repository, then at the root of the project run:

`./mvnw`

## Release

In order to create a new release push a `release-<version>` branch with the desired version in pom.xml.
Update the `master` with the next SNAPSHOT version.

## Contributing

We would love you to contribute, pull requests are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for more information.

## License

The sources and documentation in this project are released under the [GPLv2 License](LICENSE)

41 changes: 0 additions & 41 deletions connector-assembly.xml

This file was deleted.

18 changes: 0 additions & 18 deletions infrastructure/release.groovy

This file was deleted.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "bonita-connector-uipath",
"version": "1.0.0"
}
Loading

0 comments on commit d4989a1

Please sign in to comment.