Skip to content

unxed/f4 / .agents/skills/aif-ci

aif-ci

Flagged

Generate CI/CD pipeline (GitHub Actions / GitLab CI) with linting, static analysis, tests, security. Use when user says "ci", "setup ci", "github actions", "gitlab ci", "pipeline".

templates/gitlab/java.yml

View on GitHub
# GitLab CI — Java
# Template variables:
#   JAVA_VERSION: e.g., 21
#   BUILD_TOOL: maven | gradle
#   HAS_CHECKSTYLE: boolean
#   HAS_PMD: boolean
#   HAS_SPOTBUGS: boolean
#   WANT_COVERAGE: boolean
#   WANT_SECURITY: boolean

# --- Maven ---
image: maven:3.9-eclipse-temurin-${JAVA_VERSION}

stages:
  - lint
  - test
  - build

workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

default:
  interruptible: true

variables:
  MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"

.maven-cache:
  cache:
    - key:
        files:
          - pom.xml
      paths:
        - .m2/repository/
      policy: pull-push

checkstyle:
  stage: lint
  extends: .maven-cache
  script:
    - mvn checkstyle:check -B

pmd:
  stage: lint
  extends: .maven-cache
  script:
    - mvn pmd:check -B

spotbugs:
  stage: lint
  extends: .maven-cache
  script:
    - mvn compile spotbugs:check -B

tests:
  stage: test
  extends: .maven-cache
  script:
    - mvn verify -B
  artifacts:
    reports:
      junit: target/surefire-reports/TEST-*.xml
    paths:
      - target/site/jacoco/
    when: always

build:
  stage: build
  extends: .maven-cache
  needs: [tests, checkstyle, pmd, spotbugs]
  script:
    - mvn package -DskipTests -B
  artifacts:
    paths:
      - target/*.jar
    expire_in: 7 days

security:
  stage: lint
  extends: .maven-cache
  script:
    - mvn dependency-check:check -B
  allow_failure: true

# --- Gradle (alternative) ---
# image: gradle:8-jdk${JAVA_VERSION}
#
# variables:
#   GRADLE_USER_HOME: $CI_PROJECT_DIR/.gradle
#
# .gradle-cache:
#   cache:
#     - key:
#         files:
#           - build.gradle
#           - gradle/wrapper/gradle-wrapper.properties
#       paths:
#         - .gradle/caches/
#         - .gradle/wrapper/
#       policy: pull-push
#
# lint:
#   stage: lint
#   extends: .gradle-cache
#   script:
#     - ./gradlew checkstyleMain pmdMain spotbugsMain
#
# tests:
#   stage: test
#   extends: .gradle-cache
#   script:
#     - ./gradlew test jacocoTestReport
#   artifacts:
#     reports:
#       junit: build/test-results/test/TEST-*.xml
#     when: always
#
# build:
#   stage: build
#   extends: .gradle-cache
#   needs: [lint, tests]
#   script:
#     - ./gradlew assemble
#   artifacts:
#     paths:
#       - build/libs/*.jar
#     expire_in: 7 days
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall