Merge pull request #1188 from bmuschko/bm/asm-9.5 #669
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
name: Build and Release [Linux] | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Set up Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Set up Docker private registry | |
run: | | |
docker run -d -p 5000:5000 --restart=always --name registry registry:2 | |
docker run -d -p 5001:5000 --restart=always --name secure_registry -v "$(pwd)"/src/functTest/resources/auth:/auth:rw -e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" -e "REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd" registry:2 | |
- name: Compilation | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: classes | |
- name: Validate plugins | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: validatePlugins | |
- name: Unit tests | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: test | |
- name: Integration tests | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: integrationTest | |
- name: Functional tests | |
uses: gradle/gradle-build-action@v2 | |
env: | |
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }} | |
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }} | |
with: | |
arguments: functionalTest | |
- name: Documentation tests | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: docTest | |
- name: Assemble artifacts | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: assemble javadoc asciidoctorAllGuides | |
- name: Store artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: gradle-docker-plugin.jar | |
path: build/libs/*.jar | |
- name: Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: gradle/gradle-build-action@v2 | |
env: | |
PLUGIN_PORTAL_KEY: ${{ secrets.PLUGIN_PORTAL_KEY }} | |
PLUGIN_PORTAL_SECRET: ${{ secrets.PLUGIN_PORTAL_SECRET }} | |
with: | |
arguments: publishPlugins gitPublishPush -Pgradle.publish.key=${{ secrets.PLUGIN_PORTAL_KEY }} -Pgradle.publish.secret=${{ secrets.PLUGIN_PORTAL_SECRET }} -Dorg.ajoberstar.grgit.auth.username=${{ secrets.GH_TOKEN }} -is |