From 623328633f844fc278e80c2fe2a43e67b4e79c8c Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Mon, 27 Mar 2023 16:49:29 +0200 Subject: [PATCH] chore: make CI ligther --- .drone.yml | 58 +++++++++++++++++++++++++++-------------- .pre-commit-config.yaml | 1 + 2 files changed, 40 insertions(+), 19 deletions(-) diff --git a/.drone.yml b/.drone.yml index d6b2b06..0cf911e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,14 +1,21 @@ kind: pipeline type: docker -name: default +name: commit steps: - - name: Static checks + - name: checks image: eclipse-temurin:17-jdk commands: - apt-get update -qq && apt-get install -qy python3 pip git && pip install pre-commit - pre-commit run --all-files - - name: UT & IT Tests + +--- +kind: pipeline +type: docker +name: pr + +steps: + - name: tests image: quay.io/testcontainers/dind-drone-plugin environment: CI_WORKSPACE: "/drone/src" @@ -20,22 +27,6 @@ steps: volumes: - name: dockersock path: /var/run - - name: Packaging - image: eclipse-temurin:17-jdk - commands: - - ./mvnw package -B -DskipTests=true - depends_on: - - UT & IT Tests - - Static checks - - name: Docker image - image: thegeeklab/drone-docker-buildx:23 - privileged: true - settings: - pull_image: true - dry_run: true - depends_on: - - UT & IT Tests - - Static checks # Specify docker:dind as a service services: @@ -49,3 +40,32 @@ services: volumes: - name: dockersock temp: {} + +trigger: + event: + - pull_requests + - cron + +--- +kind: pipeline +type: docker +name: artifacts + +steps: + - name: packaging + image: eclipse-temurin:17-jdk + commands: + - ./mvnw package -B -DskipTests=true -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true + - name: dockerfile + image: thegeeklab/drone-docker-buildx:23 + privileged: true + settings: + pull_image: true + dry_run: true + +trigger: + branch: + - devel + event: + - push + - tag diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c9c340..35810b8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,7 @@ repos: - id: end-of-file-fixer exclude: "^.*\\.vm$" - id: check-yaml + args: [--allow-multiple-documents] - id: check-added-large-files - id: check-toml - id: mixed-line-ending