diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 063c181dc70953c7dab528f7a8d9cff83b93776f..7bec28baf08333b45b0beb5cae5307dd21aef270 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,8 +9,11 @@ stages: Build Container: image: docker:20.10 stage: build - only: - - main + rules: + - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH + changes: + - src/* + - requirements.txt tags: - frodo script: @@ -20,8 +23,11 @@ Build Container: Push Container: image: docker:20.10 stage: push - only: - - main + rules: + - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH + changes: + - src/* + - requirements.txt tags: - frodo script: @@ -34,12 +40,11 @@ Deploy Container: - main tags: - sam - needs: ["Push Container"] script: - cp ./docker-compose.yml $app_path/docker-compose.yml - cp ./resources/soil.jar $app_path/soil.jar - cd $app_path - - docker-compose -p "soil-monticore-backend" stop + - docker-compose -p "soil-monticore-backend" down - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - docker-compose -p "soil-monticore-backend" pull - docker-compose -p "soil-monticore-backend" up -d diff --git a/Dockerfile b/Dockerfile index 0f751913dfb85c28adc65ab3cb7342d44221976e..0e97824ca7264b8dba05697eb03a5157a13dd314 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ RUN pip3 install -r requirements.txt --break-system-package # 4. Copy all required source files and resources (i.e., the jar-build of the Monticore based SOIL tool) COPY ./src ./src -COPY ./resources ./resources +#COPY ./resources ./resources WORKDIR ./src # 5. Start the FastAPI server