Skip to content

doc: First draft of users and rights management #16

doc: First draft of users and rights management

doc: First draft of users and rights management #16

Workflow file for this run

name: "console"
on:
workflow_dispatch:
push:
paths:
- "ldap/**"
- "postgresql/**"
- "commons/**"
- "ldap-account-management/**"
- "console/**"
pull_request:
paths:
- "ldap/**"
- "postgresql/**"
- "commons/**"
- "ldap-account-management/**"
- "console/**"
jobs:
build:
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: "Checking out"
uses: actions/checkout@v1
- name: "Setting up Java"
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
cache: 'maven'
server-id: geOrchestra-artifactory
server-username: ARTIFACTORY_USERNAME_REF
server-password: ARTIFACTORY_TOKEN_REF
- name: "Installing & checking formatting"
run: ./mvnw install -pl :console --also-make -P-all,console --no-transfer-progress -B -Dfmt.action=validate -Dadditionalparam=-Xdoclint:none -DskipTests
# note "-pl :console --also-make" builds only the project and its dependencies
- name: "Building LDAP and PostgreSQL docker images"
if: github.repository == 'georchestra/georchestra'
run: |
docker build -t georchestra/ldap:latest ./ldap
docker build -t georchestra/database:latest ./postgresql
- name: "Running tests"
working-directory: console/
run: ../mvnw verify --no-transfer-progress -Dfmt.skip=true -Dadditionalparam=-Xdoclint:none -Dskip.npm
- name: Getting image tag
if: github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]'
id: version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: "Building docker image"
if: github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]'
working-directory: console/
run: ../mvnw --no-transfer-progress clean package docker:build -Pdocker,log4j-logstash,sentry-log4j -DdockerImageName=georchestra/console:${{ steps.version.outputs.VERSION }} -DskipTests
- name: "Logging in docker.io"
if: github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
uses: azure/docker-login@v1
with:
username: '${{ secrets.DOCKER_HUB_USERNAME }}'
password: '${{ secrets.DOCKER_HUB_PASSWORD }}'
- name: "Update Docker Hub Description"
if: github.ref == 'refs/heads/master' && github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
repository: georchestra/console
readme-filepath: ./console/DOCKER_HUB.md
short-description: 'Console module for the geOrchestra SDI'
- name: "Pushing latest to docker.io"
if: github.ref == 'refs/heads/master' && github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
run: |
docker tag georchestra/console:${{ steps.version.outputs.VERSION }} georchestra/console:latest
docker push georchestra/console:latest
- name: "Pushing release branch to docker.io"
if: contains(github.ref, 'refs/heads/24.') && github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
run: |
docker push georchestra/console:${{ steps.version.outputs.VERSION }}
- name: "Pushing release tag to docker.io"
if: contains(github.ref, 'refs/tags/24.') && github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
run: |
docker push georchestra/console:${{ steps.version.outputs.VERSION }}
- name: "Publish war in artifactory"
run: ./mvnw deploy -pl :console --also-make -P-all,console --no-transfer-progress -DskipTests
if: github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
continue-on-error: true
env:
ARTIFACTORY_TOKEN_REF: ${{ secrets.ARTIFACTORY_TOKEN }}
ARTIFACTORY_USERNAME_REF: ${{ secrets.ARTIFACTORY_USERNAME }}
- name: "Remove SNAPSHOT jars from repository"
if: github.actor != 'dependabot[bot]' && github.event_name != 'pull_request'
run: |
find .m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {}