fetch git tags before poetry commands

This commit is contained in:
Robert Kaussow 2020-12-24 00:23:12 +01:00
parent a194d90ffe
commit 97c8e5180c
Signed by: xoxys
GPG Key ID: 65362AE74AF98B61
3 changed files with 25 additions and 102 deletions

View File

@ -5,6 +5,7 @@ local PythonVersion(pyversion='3.5') = {
PY_COLORS: 1,
},
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry install -q',
'poetry run pytest dockertidy --cov=dockertidy --cov-append --no-cov-on-fail',
@ -25,13 +26,6 @@ local PipelineLint = {
arch: 'amd64',
},
steps: [
{
name: 'fetch',
image: 'alpine/git',
commands: [
'git fetch -tq',
],
},
{
name: 'flake8',
image: 'python:3.9',
@ -39,6 +33,7 @@ local PipelineLint = {
PY_COLORS: 1,
},
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry install -q',
'poetry run flake8 ./dockertidy',
@ -59,13 +54,6 @@ local PipelineTest = {
arch: 'amd64',
},
steps: [
{
name: 'fetch',
image: 'alpine/git',
commands: [
'git fetch -tq',
],
},
PythonVersion(pyversion='3.6'),
PythonVersion(pyversion='3.7'),
PythonVersion(pyversion='3.8'),
@ -106,13 +94,6 @@ local PipelineSecurity = {
arch: 'amd64',
},
steps: [
{
name: 'fetch',
image: 'alpine/git',
commands: [
'git fetch -tq',
],
},
{
name: 'bandit',
image: 'python:3.9',
@ -120,6 +101,7 @@ local PipelineSecurity = {
PY_COLORS: 1,
},
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry install -q',
'poetry run bandit -r ./dockertidy -x ./dockertidy/test',
@ -143,17 +125,11 @@ local PipelineBuildPackage = {
arch: 'amd64',
},
steps: [
{
name: 'fetch',
image: 'alpine/git',
commands: [
'git fetch -tq',
],
},
{
name: 'build',
image: 'python:3.9',
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry build',
],
@ -183,12 +159,13 @@ local PipelineBuildPackage = {
name: 'publish-pypi',
image: 'python:3.9',
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry build',
'poetry publish --build',
],
environment: {
POETRY_HTTP_BASIC_TESTPYPI_USERNAME: { from_secret: 'pypi_username' },
POETRY_HTTP_BASIC_TESTPYPI_PASSWORD: { from_secret: 'pypi_password' },
POETRY_HTTP_BASIC_PYPI_USERNAME: { from_secret: 'pypi_username' },
POETRY_HTTP_BASIC_PYPI_PASSWORD: { from_secret: 'pypi_password' },
},
when: {
ref: ['refs/tags/**'],
@ -212,17 +189,11 @@ local PipelineBuildContainer(arch='amd64') = {
arch: arch,
},
steps: [
{
name: 'fetch',
image: 'alpine/git',
commands: [
'git fetch -tq',
],
},
{
name: 'build',
image: 'python:3.9',
commands: [
'git fetch -tq',
'pip install poetry poetry-dynamic-versioning -qq',
'poetry build',
],
@ -299,13 +270,6 @@ local PipelineDocs = {
limit: 1,
},
steps: [
{
name: 'fetch',
image: 'alpine/git',
commands: [
'git fetch -tq',
],
},
{
name: 'assets',
image: 'thegeeklab/alpine-tools',
@ -412,13 +376,6 @@ local PipelineNotifications = {
arch: 'amd64',
},
steps: [
{
name: 'fetch',
image: 'alpine/git',
commands: [
'git fetch -tq',
],
},
{
image: 'plugins/manifest',
name: 'manifest-dockerhub',

View File

@ -7,14 +7,10 @@ platform:
arch: amd64
steps:
- name: fetch
image: alpine/git
commands:
- git fetch -tq
- name: flake8
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry install -q
- poetry run flake8 ./dockertidy
@ -39,14 +35,10 @@ platform:
arch: amd64
steps:
- name: fetch
image: alpine/git
commands:
- git fetch -tq
- name: python36-pytest
image: python:3.6
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry install -q
- poetry run pytest dockertidy --cov=dockertidy --cov-append --no-cov-on-fail
@ -60,6 +52,7 @@ steps:
- name: python37-pytest
image: python:3.7
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry install -q
- poetry run pytest dockertidy --cov=dockertidy --cov-append --no-cov-on-fail
@ -73,6 +66,7 @@ steps:
- name: python38-pytest
image: python:3.8
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry install -q
- poetry run pytest dockertidy --cov=dockertidy --cov-append --no-cov-on-fail
@ -86,6 +80,7 @@ steps:
- name: python39-pytest
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry install -q
- poetry run pytest dockertidy --cov=dockertidy --cov-append --no-cov-on-fail
@ -132,14 +127,10 @@ platform:
arch: amd64
steps:
- name: fetch
image: alpine/git
commands:
- git fetch -tq
- name: bandit
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry install -q
- poetry run bandit -r ./dockertidy -x ./dockertidy/test
@ -167,14 +158,10 @@ platform:
arch: amd64
steps:
- name: fetch
image: alpine/git
commands:
- git fetch -tq
- name: build
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry build
@ -201,12 +188,13 @@ steps:
- name: publish-pypi
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry build
- poetry publish --build
environment:
POETRY_HTTP_BASIC_TESTPYPI_PASSWORD:
POETRY_HTTP_BASIC_PYPI_PASSWORD:
from_secret: pypi_password
POETRY_HTTP_BASIC_TESTPYPI_USERNAME:
POETRY_HTTP_BASIC_PYPI_USERNAME:
from_secret: pypi_username
when:
ref:
@ -233,14 +221,10 @@ platform:
arch: amd64
steps:
- name: fetch
image: alpine/git
commands:
- git fetch -tq
- name: build
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry build
@ -324,14 +308,10 @@ platform:
arch: arm64
steps:
- name: fetch
image: alpine/git
commands:
- git fetch -tq
- name: build
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry build
@ -415,14 +395,10 @@ platform:
arch: arm
steps:
- name: fetch
image: alpine/git
commands:
- git fetch -tq
- name: build
image: python:3.9
commands:
- git fetch -tq
- pip install poetry poetry-dynamic-versioning -qq
- poetry build
@ -509,11 +485,6 @@ concurrency:
limit: 1
steps:
- name: fetch
image: alpine/git
commands:
- git fetch -tq
- name: assets
image: thegeeklab/alpine-tools
commands:
@ -606,11 +577,6 @@ platform:
arch: amd64
steps:
- name: fetch
image: alpine/git
commands:
- git fetch -tq
- name: manifest-dockerhub
image: plugins/manifest
settings:
@ -697,6 +663,6 @@ depends_on:
---
kind: signature
hmac: 2a60c2f0458edd526f1fd0d934e39b1b513e27e52f061368ef6f03c44fedfebf
hmac: 0d65e2bcc25f551af7335b766efdfe441f634d411c4fab68d11367e51a9a2e22
...

View File

@ -51,10 +51,10 @@ pathspec = "^0.8.1"
python = "^3.6.0"
python-dateutil = "^2.8.1"
python-json-logger = "^2.0.1"
requests = "^2.25.0"
"ruamel.yaml" = "^0.16.12"
websocket_client = "^0.57.0"
zipp = "^3.4.0"
requests = "^2.25.0"
[tool.poetry.dev-dependencies]
autopep8 = "^1.5.4"