From b18b64371ad35cf40e41ef16ce89e8adcecb594a Mon Sep 17 00:00:00 2001 From: Simon Templer Date: Wed, 13 Mar 2024 16:02:31 +0100 Subject: [PATCH 1/3] docs: add information on using local hale studio dependencies --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 24d245e..c7f0030 100644 --- a/README.md +++ b/README.md @@ -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 ------------- From 4dcc26542ce784b8332e73c1e3cd4137b031df8f Mon Sep 17 00:00:00 2001 From: Simon Templer Date: Wed, 13 Mar 2024 16:25:29 +0100 Subject: [PATCH 2/3] ci: add GitHub Actions for testing and publishing --- .github/workflows/check.yml | 22 ++++++++++++++++++++ .github/workflows/publish.yml | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/check.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..733986c --- /dev/null +++ b/.github/workflows/check.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..254a3c1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 }} From 4e73fdce68a00ca8e63391f070c008cca89b6286 Mon Sep 17 00:00:00 2001 From: Simon Templer Date: Wed, 13 Mar 2024 16:48:34 +0100 Subject: [PATCH 3/3] ci: add renovate configuration file --- .github/renovate.json5 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/renovate.json5 diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 0000000..1997521 --- /dev/null +++ b/.github/renovate.json5 @@ -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", + ], +}