From 5b75ad5bea6367058b7cbef67b9f95b1300beaef Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 14 Jan 2025 21:13:41 +0100 Subject: [PATCH 01/22] New pipline for building image --- .gitlab-ci.yml | 25 +++++++++++++++++++------ pyproject.toml | 2 +- src/optima35/__init__.py | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd116fe..8c820d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,10 @@ --- - include: - local: .gitlab-ci/versioning/gitversion.yml - local: .gitlab-ci/git/create_tag.yml stages: + - build - release gitversion: @@ -12,8 +12,21 @@ gitversion: stage: .pre tags: - gitlab-org-docker - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch +# rules: +# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch + +build: + stage: build + image: python:3.9.21 + tags: + - gitlab-org-docker + needs: + - job: gitversion + artifacts: true + script: + - sed -i "s/###VERSION###/$GitVersion_SemVer/" src/optima35/__init__.py + - python3 -m pip install --upgrade pip build twine + - python3 -m build create_tag: extends: .git:create_tag @@ -21,12 +34,12 @@ create_tag: tags: - gitlab-org-docker variables: - VERSION: v$GitVersion_SemVer + VERSION: $GitVersion_SemVer TOKEN: $GITLAB_TOKEN needs: - job: gitversion artifacts: true rules: - if: $CI_COMMIT_TAG - when: never # Do not run this job when a tag is created manually - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch + when: never # Do not run this job when a tag is created manually + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch diff --git a/pyproject.toml b/pyproject.toml index b6e50a1..2f7e4bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ classifiers = [ ] [project.urls] -Homepage = "https://gitlab.com/CodeByMrFinchum/optima35" +Source = "https://gitlab.com/CodeByMrFinchum/optima35" [project.scripts] optima35 = "optima35.__main__:main" diff --git a/src/optima35/__init__.py b/src/optima35/__init__.py index 364e7ba..f5b8609 100644 --- a/src/optima35/__init__.py +++ b/src/optima35/__init__.py @@ -1 +1 @@ -__version__ = "0.6.4" +__version__ = ###VERSION### From 9232513b09dfcbb134eeefc1d6692765918def11 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 14 Jan 2025 21:13:50 +0100 Subject: [PATCH 02/22] Legacy file --- requirements.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 357cdbd..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -piexif -pillow From 7d199e40432c1d2ca457d89bdd3c59a07ea0a744 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 14 Jan 2025 21:19:14 +0100 Subject: [PATCH 03/22] debugging --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8c820d0..93be90c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,8 +25,9 @@ build: artifacts: true script: - sed -i "s/###VERSION###/$GitVersion_SemVer/" src/optima35/__init__.py - - python3 -m pip install --upgrade pip build twine - - python3 -m build + - cat src/optima35/__init__.py + #- python3 -m pip install --upgrade pip build twine + #- python3 -m build create_tag: extends: .git:create_tag From 777413c0c65a094800c3f30d5f4221a3e6ec9068 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 14 Jan 2025 21:24:24 +0100 Subject: [PATCH 04/22] debugging --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93be90c..3b5a0a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,10 +24,10 @@ build: - job: gitversion artifacts: true script: - - sed -i "s/###VERSION###/$GitVersion_SemVer/" src/optima35/__init__.py + - sed -i "s/###VERSION###/$GitVersion_MajorMinorPatch/" src/optima35/__init__.py - cat src/optima35/__init__.py - #- python3 -m pip install --upgrade pip build twine - #- python3 -m build + - python3 -m pip install --upgrade pip build twine + - python3 -m build create_tag: extends: .git:create_tag From 1457f20d7918f4e6d2c1e6c3893de456a6926140 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 14 Jan 2025 21:27:00 +0100 Subject: [PATCH 05/22] debugging --- src/optima35/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/optima35/__init__.py b/src/optima35/__init__.py index f5b8609..49a5f0f 100644 --- a/src/optima35/__init__.py +++ b/src/optima35/__init__.py @@ -1 +1 @@ -__version__ = ###VERSION### +__version__ = "###VERSION###" From 7ba71eb4e3d4528ed3473ba90ad861695066a1d7 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 14 Jan 2025 21:38:19 +0100 Subject: [PATCH 06/22] debugging --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3b5a0a9..ca6df53 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,8 +26,11 @@ build: script: - sed -i "s/###VERSION###/$GitVersion_MajorMinorPatch/" src/optima35/__init__.py - cat src/optima35/__init__.py - - python3 -m pip install --upgrade pip build twine + - python3 -m pip install --upgrade pip build - python3 -m build + artifacts: + reports: + package: dist/* create_tag: extends: .git:create_tag From d7fcdfa6eae7f404fcbdda9cfcb3fa34655b8dba Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 14 Jan 2025 21:45:34 +0100 Subject: [PATCH 07/22] debugging --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ca6df53..f134b94 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,8 +29,9 @@ build: - python3 -m pip install --upgrade pip build - python3 -m build artifacts: - reports: - package: dist/* + paths: + - dist/* + expire_in: 1 day create_tag: extends: .git:create_tag From 25679a12cecf89e348764f276dd605515ad37fbe Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 14 Jan 2025 21:59:55 +0100 Subject: [PATCH 08/22] debugging --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f134b94..0fccb87 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ build: - job: gitversion artifacts: true script: - - sed -i "s/###VERSION###/$GitVersion_MajorMinorPatch/" src/optima35/__init__.py + - sed -i "s/###VERSION###/'$GitVersion_MajorMinorPatch'a'$GitVersion_BuildMetaData'/" src/optima35/__init__.py - cat src/optima35/__init__.py - python3 -m pip install --upgrade pip build - python3 -m build From 80f2049780b4a3672842389639c760377865fa00 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 14 Jan 2025 22:02:12 +0100 Subject: [PATCH 09/22] debugging --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0fccb87..00d5dac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ build: - job: gitversion artifacts: true script: - - sed -i "s/###VERSION###/'$GitVersion_MajorMinorPatch'a'$GitVersion_BuildMetaData'/" src/optima35/__init__.py + - sed -i "s/###VERSION###/$GitVersion_MajorMinorPatch\a$GitVersion_BuildMetaData/" src/optima35/__init__.py - cat src/optima35/__init__.py - python3 -m pip install --upgrade pip build - python3 -m build From 0751d4aa268b0ece92b6057deb57f362f1585fa7 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 14 Jan 2025 22:05:48 +0100 Subject: [PATCH 10/22] debugging --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00d5dac..5f2dbee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ build: - job: gitversion artifacts: true script: - - sed -i "s/###VERSION###/$GitVersion_MajorMinorPatch\a$GitVersion_BuildMetaData/" src/optima35/__init__.py + - sed -i "s/###VERSION###/${GitVersion_MajorMinorPatch}a${GitVersion_BuildMetaData}/" src/optima35/__init__.py - cat src/optima35/__init__.py - python3 -m pip install --upgrade pip build - python3 -m build From bf95b63a1db9f79be085d4bed0c79fb0611c0877 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 14 Jan 2025 22:10:03 +0100 Subject: [PATCH 11/22] new var --- .gitlab-ci/versioning/gitversion.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/versioning/gitversion.yml b/.gitlab-ci/versioning/gitversion.yml index 5391fdf..dbbc149 100644 --- a/.gitlab-ci/versioning/gitversion.yml +++ b/.gitlab-ci/versioning/gitversion.yml @@ -1,5 +1,4 @@ --- - .versioning:gitversion: image: name: mcr.microsoft.com/dotnet/sdk:9.0 @@ -25,6 +24,7 @@ grep 'GitVersion_Minor=' gitversion.properties >> gitversion.env grep 'GitVersion_Patch=' gitversion.properties >> gitversion.env grep 'GitVersion_MajorMinorPatch=' gitversion.properties >> gitversion.env + grep 'GitVersion_BuildMetaData=' gitversion.properties >> gitversion.env artifacts: reports: # propagates variables into the pipeline level From 5c1acf669921a919d4628880a1ef472423779f5d Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Thu, 16 Jan 2025 16:32:37 +0100 Subject: [PATCH 12/22] debugging pipline --- .gitlab-ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5f2dbee..2a0319b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,13 +26,25 @@ build: script: - sed -i "s/###VERSION###/${GitVersion_MajorMinorPatch}a${GitVersion_BuildMetaData}/" src/optima35/__init__.py - cat src/optima35/__init__.py - - python3 -m pip install --upgrade pip build + - python3 -m pip install build - python3 -m build artifacts: paths: - dist/* expire_in: 1 day +#publish: +#stage: release +#image: python:3.9.21 +#tags: +#- gitlab-org-docker +#needs: +#- job: build +#artifacts: true +#script: +#- python3 -m pip install twine +#- python3 -m twine upload --repository testpypi dist/* + create_tag: extends: .git:create_tag stage: release From 66fcc0b00ac46a1e13d3808a74168d4c33b8c718 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 21 Jan 2025 18:23:41 +0100 Subject: [PATCH 13/22] debugging pipline --- .gitlab-ci.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a0319b..32ba334 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,17 +33,19 @@ build: - dist/* expire_in: 1 day -#publish: -#stage: release -#image: python:3.9.21 -#tags: -#- gitlab-org-docker -#needs: -#- job: build -#artifacts: true -#script: -#- python3 -m pip install twine -#- python3 -m twine upload --repository testpypi dist/* +publish: + stage: release + image: python:3.9.21 + tags: + - gitlab-org-docker + variables: + TWINE_PASSWORD: $TWINE_API + needs: + - job: build + artifacts: true + script: + - python3 -m pip install twine + - python3 -m twine upload --repository testpypi dist/* create_tag: extends: .git:create_tag From fbb1724373aaca89141a438459e61fd36ad4c3af Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 21 Jan 2025 18:28:49 +0100 Subject: [PATCH 14/22] debugging pipline --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 32ba334..c5e4b74 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,6 +39,7 @@ publish: tags: - gitlab-org-docker variables: + TWINE_USERNAME: $TWINE_USER TWINE_PASSWORD: $TWINE_API needs: - job: build From 44b3014b901fa70098acca2b5f5c8b50ead1705d Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 21 Jan 2025 18:31:41 +0100 Subject: [PATCH 15/22] debugging pipline --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c5e4b74..89a7af5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,7 +46,7 @@ publish: artifacts: true script: - python3 -m pip install twine - - python3 -m twine upload --repository testpypi dist/* + - python3 -m twine upload --repository testpypi dist/* --verbose create_tag: extends: .git:create_tag From d5e2744010ec077e30e9dad50e81fcace97c3404 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 21 Jan 2025 18:35:16 +0100 Subject: [PATCH 16/22] debugging pipline --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 89a7af5..7812db4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,6 +46,8 @@ publish: artifacts: true script: - python3 -m pip install twine + - echo $TWINE_API + - echo $TWINE_PASSWORD - python3 -m twine upload --repository testpypi dist/* --verbose create_tag: From 0c4fbc13da5d463d86b166e6b58000013ef113d5 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 21 Jan 2025 18:43:54 +0100 Subject: [PATCH 17/22] debugging pipline --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7812db4..b990e6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,15 +39,17 @@ publish: tags: - gitlab-org-docker variables: - TWINE_USERNAME: $TWINE_USER + TWINE_USERNAME: "__token__" TWINE_PASSWORD: $TWINE_API needs: - job: build artifacts: true script: - python3 -m pip install twine + - echo $TWINE_USERNAME - echo $TWINE_API - echo $TWINE_PASSWORD + - echo $TWIN_USER - python3 -m twine upload --repository testpypi dist/* --verbose create_tag: From a5a65887bef1952b05ed9786e85e309ed19532ee Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 21 Jan 2025 18:57:14 +0100 Subject: [PATCH 18/22] debugging pipline --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b990e6b..7c4580b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ build: - job: gitversion artifacts: true script: - - sed -i "s/###VERSION###/${GitVersion_MajorMinorPatch}a${GitVersion_BuildMetaData}/" src/optima35/__init__.py + - sed -i "s/0.0.1/${GitVersion_MajorMinorPatch}a${GitVersion_BuildMetaData}/" src/optima35/__init__.py - cat src/optima35/__init__.py - python3 -m pip install build - python3 -m build From 9193406fe42562972b3d45c35a4ed369d34446d0 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 21 Jan 2025 18:58:00 +0100 Subject: [PATCH 19/22] debugging pipline --- .gitlab-ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c4580b..3f10601 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,11 +46,7 @@ publish: artifacts: true script: - python3 -m pip install twine - - echo $TWINE_USERNAME - - echo $TWINE_API - - echo $TWINE_PASSWORD - - echo $TWIN_USER - - python3 -m twine upload --repository testpypi dist/* --verbose + - python3 -m twine upload --repository testpypi dist/* create_tag: extends: .git:create_tag From 474a588069fbfbdcec6211c33548b95a1cbac01c Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 21 Jan 2025 18:58:14 +0100 Subject: [PATCH 20/22] debugging --- src/optima35/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/optima35/__init__.py b/src/optima35/__init__.py index 49a5f0f..f102a9c 100644 --- a/src/optima35/__init__.py +++ b/src/optima35/__init__.py @@ -1 +1 @@ -__version__ = "###VERSION###" +__version__ = "0.0.1" From 4c0c8913761b4722ecb056b70d8ecb82cb8179fd Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 21 Jan 2025 19:37:57 +0100 Subject: [PATCH 21/22] finalazing pipline --- .gitlab-ci.yml | 10 +++++++--- Gitversion.yml | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f10601..1aef2d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,19 +12,21 @@ gitversion: stage: .pre tags: - gitlab-org-docker -# rules: -# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch build: stage: build image: python:3.9.21 tags: - gitlab-org-docker + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch needs: - job: gitversion artifacts: true script: - - sed -i "s/0.0.1/${GitVersion_MajorMinorPatch}a${GitVersion_BuildMetaData}/" src/optima35/__init__.py + - sed -i "s/0.0.1/${GitVersion_MajorMinorPatch}" src/optima35/__init__.py - cat src/optima35/__init__.py - python3 -m pip install build - python3 -m build @@ -38,6 +40,8 @@ publish: image: python:3.9.21 tags: - gitlab-org-docker + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch variables: TWINE_USERNAME: "__token__" TWINE_PASSWORD: $TWINE_API diff --git a/Gitversion.yml b/Gitversion.yml index 165f995..907c4c5 100644 --- a/Gitversion.yml +++ b/Gitversion.yml @@ -1,3 +1,5 @@ --- - mode: Mainline +major-version-bump-message: "^(build|chore|ci|docs|feat|fix|patch|refactor|revert|style|test)(\\([\\w\\s-,/\\\\]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)" # noqa yaml[line-length] +minor-version-bump-message: "^(build|chore|ci|docs|feat|refactor|revert|style|test)(\\([\\w\\s-,/\\\\]*\\))?:" +patch-version-bump-message: "^(fix|patch)(\\([\\w\\s-,/\\\\]*\\))?:" From 8e4a3ed52ea0b139e4279344c01b3fdbac4adf65 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 21 Jan 2025 19:39:27 +0100 Subject: [PATCH 22/22] finishing --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1aef2d9..363a744 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,7 +50,7 @@ publish: artifacts: true script: - python3 -m pip install twine - - python3 -m twine upload --repository testpypi dist/* + - python3 -m twine upload dist/* create_tag: extends: .git:create_tag