Skip to content

Commit

Permalink
Merge pull request #193 from jdi-testing/release/0.3.0
Browse files Browse the repository at this point in the history
Release 0.3.0
  • Loading branch information
ivnglkv authored Jun 14, 2024
2 parents 82fe341 + a023e0f commit 9d3c422
Show file tree
Hide file tree
Showing 45 changed files with 2,551 additions and 1,777 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,14 @@ data/uploaded_dataset
data/other

**/notebooks

# Git data is not needed in Docker container
.git/
.gitignore
.gitmodules

# These scripts are unnecessary in Docker container
build_docker.sh
create-env.bat
remove-env.bat
run_docker.sh
1 change: 1 addition & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
JDI_VERSION_LABEL=latest
SELENOID_PARALLEL_SESSIONS_COUNT=4
46 changes: 0 additions & 46 deletions .github/workflows/.release-workflow-rc.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/.release-workflow.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/docker-image-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: JDI QASP Docker image build workflow

on:
workflow_call:
push:
tags:
- '*'
pull_request:
branches:
- master

env:
RUN_ON_RC: ${{ startsWith( github.head_ref, 'release/' ) }}

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/jdi-testing/jdi-qasp-ml
labels: |
maintainer=github.com/jdi-testing
org.opencontainers.image.title=JDI QASP ML
org.opencontainers.image.description=Backend for JDN Chrome plugin
tags: |
type=ref,event=branch
type=ref,event=pr,enable=${{ env.RUN_ON_RC == 'false' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=rc,enable=${{ env.RUN_ON_RC == 'true' }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up default environment
run: cp .env.dist .env
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
36 changes: 36 additions & 0 deletions .github/workflows/patch-version-increment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Patch version increment

on:
push:
branches:
- develop

jobs:
version-update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: false
- name: Increment version
run: |
cd model/version
OLD_VERSION=$(ls)
FIRST_DIGIT=$(echo $OLD_VERSION | cut -d '.' -f 1)
SECOND_DIGIT=$(echo $OLD_VERSION | cut -d '.' -f 2)
THIRD_DIGIT=$(echo $OLD_VERSION | cut -d '.' -f 3)
NEW_THIRD_DIGIT=$((THIRD_DIGIT+1))
NEW_VERSION=$FIRST_DIGIT.$SECOND_DIGIT.$NEW_THIRD_DIGIT
echo \"$OLD_VERSION\"
echo \"$NEW_VERSION\"
echo `pwd`
mv ./$OLD_VERSION ./$NEW_VERSION
cd ../..
- name: Commit incremented version
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Increment version [ci skip]
build:
needs: version-update
uses: ./.github/workflows/docker-image-update.yml
23 changes: 23 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PR to develop

on:
pull_request:
branches:
- develop

jobs:
lint:
runs-on: ubuntu-latest
env:
COMPOSE_FILE: docker-compose.yaml:docker-compose.override.ci.yaml
SELENOID_PARALLEL_SESSIONS_COUNT: 2
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: false
- name: Lint
run: docker compose run api make lint
build:
needs: lint
uses: ./.github/workflows/docker-image-update.yml
11 changes: 0 additions & 11 deletions .github/workflows/release-rc-version.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/release-rest-version.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/release-stable-version.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ coverage.xml
.env
.env.rc
.env.dev

docker-compose.override.yaml
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ RUN apt install -y curl wget mc gcc make
ENV APP_HOME=/jdi-qasp-ml
WORKDIR ${APP_HOME}

COPY Pipfile* ${APP_HOME}/
COPY Pipfile* ./

RUN pip install -U pip && \
pip install pipenv

RUN pipenv install --ignore-pipfile --system --deploy

COPY . ${APP_HOME}
COPY . ./

RUN chmod +x start_celery.sh

ENV PYTHONPATH=${PYTHONPATH}:/jdi-qasp-ml
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ redis = "*"
motor = "*"
async-lru = "==1.0.3"
cachetools = "*"
beautifulsoup4 = "*"

[dev-packages]

Expand Down
Loading

0 comments on commit 9d3c422

Please sign in to comment.