Skip to content

Commit

Permalink
feat: Add github actions (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Aliaksandr Stsiapanay <[email protected]>
  • Loading branch information
astsiapanay and astsiapanay committed Oct 20, 2023
1 parent 3e71b59 commit 433701c
Show file tree
Hide file tree
Showing 22 changed files with 104 additions and 600 deletions.
14 changes: 14 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"LABEL": {
"name": "",
"color": "EEEEEE"
},
"CHECKS": {
"prefixes": ["fix: ", "feat: ", "feature: ", "chore: ", "hotfix: "]
},
"MESSAGES": {
"success": "All OK",
"failure": "Missing prefix",
"notice": ""
}
}
12 changes: 12 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Integration tests

on:
pull_request:
branches: [ development, release-* ]
issue_comment:
types: [created]

jobs:
integration_tests:
uses: epam/ai-dial-ci/.github/workflows/[email protected]
secrets: inherit
16 changes: 16 additions & 0 deletions .github/workflows/pr_check_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Code checks - tests

on:
pull_request:
branches:
- development
- release-*

jobs:
run_tests:
uses: epam/ai-dial-ci/.github/workflows/[email protected]
secrets: inherit
with:
bypass_checks: false
java_version: 17
java_distribution: temurin
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Release version

on:
push:
branches: [ development, release-* ]

env:
IMAGE_NAME: ${{ github.repository }}

jobs:
release:
uses: epam/ai-dial-ci/.github/workflows/[email protected]
secrets: inherit
257 changes: 0 additions & 257 deletions .gitlab-ci.yml

This file was deleted.

32 changes: 22 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
FROM amazoncorretto:11-alpine3.17
FROM gradle:8.3.0-jdk17-alpine as cache
WORKDIR /home/gradle/src
ENV GRADLE_USER_HOME /cache
COPY build.gradle settings.gradle ./
RUN gradle --no-daemon build --stacktrace

ADD ./build/distributions/aidial-auth-helper-*.tar /opt/epam/aidial/
RUN mv /opt/epam/aidial/aidial-auth-helper-*/* /opt/epam/aidial/
RUN rmdir /opt/epam/aidial/aidial-auth-helper-*
FROM gradle:8.3.0-jdk17-alpine as builder
COPY --from=cache /cache /home/gradle/.gradle
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle --no-daemon build --stacktrace -PdisableCompression=true
RUN mkdir /build && tar -xf /home/gradle/src/build/distributions/aidial-auth-helper-*.tar --strip-components=1 -C /build

RUN addgroup -S aidial --gid 1801 \
&& adduser -D -H -S aidial -G aidial -u 1801 \
&& chown aidial:aidial -R /opt/epam/aidial
FROM eclipse-temurin:17-jdk-alpine

USER aidial
WORKDIR /app

RUN addgroup -S aidial --gid 1001 \
&& adduser -D -H -S aidial -G aidial -u 1001

COPY --from=builder --chown=aidial:aidial /build/ .

WORKDIR /opt/epam/aidial
RUN chown -R aidial:aidial /app

USER aidial

ENTRYPOINT ["/opt/epam/aidial/bin/aidial-auth-helper"]
ENTRYPOINT ["/app/bin/aidial-auth-helper"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Currently, AuthProxy provides two public routes:

# Developer env

- Open JDK 11+
- Gradle 7+
- Open JDK 17+
- Gradle 8+

# Build

Expand Down
Loading

0 comments on commit 433701c

Please sign in to comment.