Skip to content

Commit

Permalink
[build] add querqy-unplugged jar build GA
Browse files Browse the repository at this point in the history
  • Loading branch information
anydef committed Nov 27, 2023
1 parent d0f51a3 commit fda84a2
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 'querqy-unplugged'
on:
push:
branches:
- main
env:
SERVICE_NAME: querqy-unplugged
JDK_VERSION: 11

permissions:
id-token: write
contents: read # This is required for actions/checkout
statuses: write
checks: write

jobs:
build-from-script:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '${{ inputs.jdk }}'

- name: ECR Login
uses: aws-actions/amazon-ecr-login@v1
- name: Setup Gradle
uses: gradle/[email protected]
with:
gradle-version: ${{ env.JDK_VERSION }}

- name: run tests
run: ./gradlew --refresh-dependencies check

- name: jar
run: ./gradlew :library:clean :library:assemble :library:testClasses :library:jar

- name: test report
uses: dorny/test-reporter@v1
if: always() # run this step even if previous step failed
with:
name: test report # Name of the check run which will be created
path: build/test-results/**/TEST-*.xml # Path to test results
reporter: java-junit
52 changes: 52 additions & 0 deletions gradle/repositoriesGitHub.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* (
* ( ( ( ( )\ )
* ( )\ ( )\))( ' )\ (()/( (
* )((_) )\ ((_)()\ )((((_)( /(_)))\
* ((_)_ ((_) _(())\_)())\ _ )\ (_)) ((_)
* | _ )| __|\ \((_)/ /(_)_\(_)| _ \| __|
* | _ \| _| \ \/\/ / / _ \ | /| _|
* |___/|___| \_/\_/ /_/ \_\ |_|_\|___|
*
This file is a copy from the pipeline-scripts project (git@github.com:otto-ec/search_pipeline-scripts.git)
It will be overwritten every night by the source from the pipeline-scripts.
If you want to make changes to it that should be available globally, change it in the pipeline-scripts repo.
If you have a change unique to this project consider putting the information elsewhere.
*/
apply plugin: 'maven-publish'

allprojects {
repositories {
// mavenLocal() uncomment to
mavenCentral()
maven {
name "GitHub"
url "https://maven.pkg.github.com/otto-de/querqy-unplugged"
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("FKT_USER")
password = project.findProperty("gpr.key") ?: System.getenv("FKT_KEY")
}
}
flatDir {
dirs "libs"
}
}
}

publishing {
repositories {
maven {
name "Github"
url "https://maven.pkg.github.com/otto-ec/nucleus_libs"
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("FKT_USER")
password = project.findProperty("gpr.key") ?: System.getenv("FKT_KEY")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}
9 changes: 9 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
id 'signing'
}

apply from: '../gradle/repositoriesGitHub.gradle'

repositories {
mavenCentral()
}
Expand All @@ -13,6 +15,7 @@ allprojects {
version = '1.0.1-SNAPSHOT'
}


ext {
querqyCoreVersion = '3.15.0'
elasticsearchVersion = '7.17.8'
Expand Down Expand Up @@ -100,6 +103,12 @@ publishing {
}
}
}

jar {
archiveBaseName = "${rootProject.name}"
archiveVersion = "${project.version}"
}

/*
signing {
def signingKey = findProperty("signingKey")
Expand Down

0 comments on commit fda84a2

Please sign in to comment.