New pipline for building image
This commit is contained in:
parent
a737d09e7c
commit
5b75ad5bea
3 changed files with 21 additions and 8 deletions
|
@ -1,10 +1,10 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- local: .gitlab-ci/versioning/gitversion.yml
|
- local: .gitlab-ci/versioning/gitversion.yml
|
||||||
- local: .gitlab-ci/git/create_tag.yml
|
- local: .gitlab-ci/git/create_tag.yml
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- build
|
||||||
- release
|
- release
|
||||||
|
|
||||||
gitversion:
|
gitversion:
|
||||||
|
@ -12,8 +12,21 @@ gitversion:
|
||||||
stage: .pre
|
stage: .pre
|
||||||
tags:
|
tags:
|
||||||
- gitlab-org-docker
|
- gitlab-org-docker
|
||||||
rules:
|
# rules:
|
||||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch
|
# - 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:
|
create_tag:
|
||||||
extends: .git:create_tag
|
extends: .git:create_tag
|
||||||
|
@ -21,12 +34,12 @@ create_tag:
|
||||||
tags:
|
tags:
|
||||||
- gitlab-org-docker
|
- gitlab-org-docker
|
||||||
variables:
|
variables:
|
||||||
VERSION: v$GitVersion_SemVer
|
VERSION: $GitVersion_SemVer
|
||||||
TOKEN: $GITLAB_TOKEN
|
TOKEN: $GITLAB_TOKEN
|
||||||
needs:
|
needs:
|
||||||
- job: gitversion
|
- job: gitversion
|
||||||
artifacts: true
|
artifacts: true
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_TAG
|
- if: $CI_COMMIT_TAG
|
||||||
when: never # Do not run this job when a tag is created manually
|
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
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch
|
||||||
|
|
|
@ -17,7 +17,7 @@ classifiers = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://gitlab.com/CodeByMrFinchum/optima35"
|
Source = "https://gitlab.com/CodeByMrFinchum/optima35"
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
optima35 = "optima35.__main__:main"
|
optima35 = "optima35.__main__:main"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.6.4"
|
__version__ = ###VERSION###
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue