Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add GitHub Actions for testing and publishing #91

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
extends: [
"config:recommended",
"helpers:pinGitHubActionDigestsToSemver",
"security:openssf-scorecard",
":enableVulnerabilityAlertsWithLabel(security)",
":docker",
"docker:pinDigests",
],
}
22 changes: 22 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check

on:
pull_request:
branches:
- master
- devel

jobs:
check:
uses: wetransform/gha-workflows/.github/workflows/gradle-library-check.yml@master
with:
java-version: 17

docker:
uses: wetransform/gha-workflows/.github/workflows/gradle-service-check.yml@master
with:
java-version: 17
image-tag: wetransform/hale-cli:latest # image to scan
# don't run tests since this is already done in check
gradle-tasks: clean dockerTagLatest
expect-tests: false
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish

on:
push:
branches:
- devel
- master
workflow_dispatch: {}

concurrency:
# only run one publishing at a time to avoid conflicts in artifactory
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
artifacts:
uses: wetransform/gha-workflows/.github/workflows/gradle-library.yml@master
with:
java-version: 17
gradle-tasks: clean check distZip buildDeb publish
upload-artifact-path: build/distributions
upload-artifact-name: distributions
secrets:
SLACK_NOTIFICATIONS_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}

docker:
# FIXME both master and devel will push latest - only one should
uses: wetransform/gha-workflows/.github/workflows/gradle-service-publish.yml@master
with:
java-version: 17
image-tag: wetransform/hale-cli:latest # image to scan
# don't run tests since this is already done in artifacts
gradle-tasks: clean dockerPushImage
expect-tests: false
secrets:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
SLACK_NOTIFICATIONS_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,29 @@ If using `./gradlew installDist`, the start script can be found in `./build/inst
JVM parameters can be provided to the start script with the `HALE_OPTS` environment variable.


Use custom hale studio dependencies during development
------------------------------------------------------

If you do changes to hale studio and want to test your changes with hale-cli in your local environment, then you need to perform these steps:

1. Build hale studio locally and publish the related artifacts to you local Maven repository.

For that change to the `build/` folder in your hale studio checkout and run the following command:

```
./build.sh clean && ./build.sh installArtifacts`
```
2. Make sure that in the `build.gradle` file the line adding the `mavenLocal` repository is uncommented (see [here](https://github.com/halestudio/hale-cli/blob/1ac56a52c359e52d71fe210b1cc4681aa53e3edb/build.gradle#L40)).
3. If necessary adapt the version of the hale-studio dependencies to the ones you published (see [here](https://github.com/halestudio/hale-cli/blob/1ac56a52c359e52d71fe210b1cc4681aa53e3edb/build.gradle#L29)).

Gradle will then take care to use the local dependencies.
If you want to create a local build of hale-cli that you want to use, you can for instance run

```
./gradlew clean installDist
```


Configuration
-------------

Expand Down
Loading