From 17a2d1338af97ea0595785d0390e09c510d5c4df Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Thu, 6 Jul 2023 18:37:43 +0200 Subject: [PATCH] use the new build also in pipeline --- .gitlab-ci.yml | 32 ++++++-------------- build.py | 2 +- infrastructure/clojure/build.py | 2 +- infrastructure/devops-build/build.py | 2 +- infrastructure/devops-build/image/Dockerfile | 1 - 5 files changed, 13 insertions(+), 26 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a0dd96..b11796a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: "python:3.10" +image: "domaindrivenarchitecture/devops-build:4.0.0" before_script: - python --version @@ -13,30 +13,16 @@ stages: - upload - image -flake8: +lint: stage: lint&test script: - - pip install -r dev_requirements.txt - - flake8 --max-line-length=120 --count --select=E9,F63,F7,F82 --show-source --statistics src/main/python/ddadevops/ - - flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --per-file-ignores="__init__.py:F401" --ignore=E722,W503 --statistics src/main/python/ddadevops/ - -mypy: - stage: lint&test - script: - - pip install -r dev_requirements.txt - - python -m mypy src/main/python/ddadevops/ --ignore-missing-imports --disable-error-code=attr-defined --disable-error-code=union-attr - -pylint: - stage: lint&test - script: - - pip install -r dev_requirements.txt - - pylint -d W0511,R0903,C0301,W0614,C0114,C0115,C0116,similarities,W1203,W0702,W0702,R0913,R0902,R0914,R1732,R1705,W0707,C0123,W0703,C0103 src/main/python/ddadevops/ + - pyb lint pytest: stage: lint&test script: - pip install -r dev_requirements.txt - - pytest + - pyb test pypi-stable: stage: upload @@ -48,17 +34,19 @@ pypi-stable: - pyb -P version=$CI_COMMIT_TAG publish upload clojure-image-test-publish: - image: domaindrivenarchitecture/devops-build:latest stage: image rules: - - if: '$CI_COMMIT_TAG != null' + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never + - if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/' script: - cd infrastructure/clojure && pyb image test publish devops-build-image-test-publish: - image: domaindrivenarchitecture/devops-build:latest stage: image rules: - - if: '$CI_COMMIT_TAG != null' + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never + - if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/' script: - cd infrastructure/devops-build && pyb image test publish diff --git a/build.py b/build.py index 040c58c..85c469b 100644 --- a/build.py +++ b/build.py @@ -45,7 +45,7 @@ license = "Apache Software License" def initialize(project): #project.build_depends_on('mockito') #project.build_depends_on('unittest-xml-reporting') - project.build_depends_on("ddadevops>=4.0.0-dev") + project.build_depends_on("ddadevops>=4.0.0") project.set_property("verbose", True) project.get_property("filter_resources_glob").append("main/python/ddadevops/__init__.py") diff --git a/infrastructure/clojure/build.py b/infrastructure/clojure/build.py index c3d89d2..3267dae 100644 --- a/infrastructure/clojure/build.py +++ b/infrastructure/clojure/build.py @@ -19,7 +19,7 @@ def initialize(project): "mixin_types": [], } - project.build_depends_on("ddadevops>=4.0.0-dev") + project.build_depends_on("ddadevops>=4.0.0") build = DevopsImageBuild(project, input) build.initialize_build_dir() diff --git a/infrastructure/devops-build/build.py b/infrastructure/devops-build/build.py index 4dd891e..a415b4d 100644 --- a/infrastructure/devops-build/build.py +++ b/infrastructure/devops-build/build.py @@ -19,7 +19,7 @@ def initialize(project): "mixin_types": [], } - project.build_depends_on("ddadevops>=4.0.0-dev") + project.build_depends_on("ddadevops>=4.0.0") build = DevopsImageBuild(project, input) build.initialize_build_dir() diff --git a/infrastructure/devops-build/image/Dockerfile b/infrastructure/devops-build/image/Dockerfile index efb8f57..915db82 100644 --- a/infrastructure/devops-build/image/Dockerfile +++ b/infrastructure/devops-build/image/Dockerfile @@ -3,5 +3,4 @@ FROM docker:latest RUN set -eux; RUN apk add --no-cache build-base rust python3 python3-dev py3-pip py3-setuptools py3-wheel libffi-dev openssl-dev cargo bash; RUN python3 -m pip install -U pip; -#RUN ln -s /usr/bin/python3 /usr/bin/python RUN pip3 install pybuilder ddadevops deprecation dda-python-terraform boto3 mfa pyyaml;