add ci to test
This commit is contained in:
parent
73a9a3ff6f
commit
5cd3a3b9fd
3 changed files with 59 additions and 7 deletions
20
.gitlab-ci.yml
Normal file
20
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
stages:
|
||||
- build_on_main
|
||||
- build_on_tag
|
||||
|
||||
build_on_main:
|
||||
image: domaindrivenarchitecture/devops-build:latest
|
||||
stage: build_on_main
|
||||
script:
|
||||
- echo "buld on main"
|
||||
|
||||
build_on_tag:
|
||||
image: domaindrivenarchitecture/devops-build:latest
|
||||
stage: build_on_tag
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
when: never
|
||||
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
|
||||
script:
|
||||
- echo "buld on tag"
|
||||
|
11
README.md
Normal file
11
README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Release Testing
|
||||
## NoRelease
|
||||
|
||||
```
|
||||
pyb dev prepare_release publish tag_bump_and_push_release
|
||||
```
|
||||
## Release
|
||||
|
||||
```
|
||||
pyb [patch|minor|major] prepare_release tag_bump_and_push_release
|
||||
```
|
35
build.py
35
build.py
|
@ -6,9 +6,6 @@ name = "buildtest"
|
|||
MODULE = "release"
|
||||
PROJECT_ROOT_PATH = "."
|
||||
|
||||
class MyBuild(ReleaseMixin):
|
||||
pass
|
||||
|
||||
|
||||
@init
|
||||
def initialize(project):
|
||||
|
@ -20,24 +17,48 @@ def initialize(project):
|
|||
"project_root_path": PROJECT_ROOT_PATH,
|
||||
"build_types": [],
|
||||
"mixin_types": ["RELEASE"],
|
||||
"release_type": "MINOR",
|
||||
"release_primary_build_file": "project.clj",
|
||||
"release_secondary_build_files": ["package.json"],
|
||||
}
|
||||
|
||||
project.build_depends_on("ddadevops>=4.0.0-dev")
|
||||
|
||||
build = MyBuild(project, input)
|
||||
build = ReleaseMixin(project, input)
|
||||
build.initialize_build_dir()
|
||||
|
||||
|
||||
@task
|
||||
def patch(project):
|
||||
build(project, "PATCH")
|
||||
|
||||
@task
|
||||
def minor(project):
|
||||
build(project, "MINOR")
|
||||
|
||||
@task
|
||||
def major(project):
|
||||
build(project, "MAJOR")
|
||||
|
||||
@task
|
||||
def dev(project):
|
||||
build(project, "NONE")
|
||||
|
||||
@task
|
||||
def nothing(project):
|
||||
pass
|
||||
|
||||
@task
|
||||
def prepare_release(project):
|
||||
build = get_devops_build(project)
|
||||
build.prepare_release()
|
||||
|
||||
|
||||
@task
|
||||
def after_publish(project):
|
||||
def tag_bump_and_push_release(project):
|
||||
build = get_devops_build(project)
|
||||
build.tag_bump_and_push_release()
|
||||
|
||||
|
||||
def build(project, release_type):
|
||||
build = get_devops_build(project)
|
||||
build.update_release_type(release_type)
|
||||
nothing(project)
|
||||
|
|
Loading…
Reference in a new issue