Skip to content
Snippets Groups Projects
Commit b713a597 authored by Prada Sarasola, Miguel's avatar Prada Sarasola, Miguel
Browse files

Modify python job logic

Create hidden templates in core and make conditionally make them visible in auto-rules
parent 6b93b657
No related branches found
No related tags found
1 merge request!80Resolve "python_syntax is python2 only"
Pipeline #137369 failed
...@@ -49,7 +49,8 @@ industrial_ci_humble: ...@@ -49,7 +49,8 @@ industrial_ci_humble:
- if: $DEFAULT_DISTRO == "humble" - if: $DEFAULT_DISTRO == "humble"
- if: $BUILD_HUMBLE - if: $BUILD_HUMBLE
.py3_template: py3_template:
extends: .py3_template
rules: rules:
- if: $DEFAULT_DISTRO == "noetic" - if: $DEFAULT_DISTRO == "noetic"
when: always when: always
...@@ -61,7 +62,8 @@ industrial_ci_humble: ...@@ -61,7 +62,8 @@ industrial_ci_humble:
when: always when: always
when: always when: always
.py2_template: py2_template:
extends: .py2_template
rules: rules:
- if: $DEFAULT_DISTRO == "kinetic" - if: $DEFAULT_DISTRO == "kinetic"
when: always when: always
......
...@@ -22,42 +22,39 @@ ...@@ -22,42 +22,39 @@
- bandit -r . || RET=1 - bandit -r . || RET=1
- safety check || RET=1 - safety check || RET=1
- exit $RET - exit $RET
when: always
allow_failure: true allow_failure: true
.py3_template: .py3_template:
image: python:3-alpine image: python:3-alpine
variables: variables:
PYTHON_VERSION: python3 PYTHON_VERSION: python3
when: never
.py2_template: .py2_template:
image: python:2-alpine image: python:2-alpine
variables: variables:
PYTHON_VERSION: python2 PYTHON_VERSION: python2
when: always
py3-flake8: .py3-flake8:
extends: extends:
- .flake8_template - .flake8_template
- .py3_template - .py3_template
py2-flake8: .py2-flake8:
extends: extends:
- .flake8_template - .flake8_template
- .py2_template - .py2_template
py3-flake8_extended: .py3-flake8_extended:
extends: extends:
- .flake8_extended_template - .flake8_extended_template
- .py3_template - .py3_template
py2-flake8_extended: .py2-flake8_extended:
extends: extends:
- .flake8_extended_template - .flake8_extended_template
- .py2_template - .py2_template
py3-security: .py3-security:
extends: extends:
- .security_template - .security_template
- .py3_template - .py3_template
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment