prepare for publish_artifacts_test

This commit is contained in:
Michael Jerger 2023-08-17 08:46:22 +02:00
parent f958825aa2
commit 9c4fe0075f
2 changed files with 33 additions and 9 deletions

View file

@ -2,19 +2,31 @@ 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
.tag_only: &tag_only
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/'
.ddadevops: &ddo
image: "domaindrivenarchitecture/4.5.5-dev2023-08-17-08-40-46"
before_script:
- export RELEASE_ARTIFACT_TOKEN=$test
build_on_main:
<<: *ddo
stage: build_on_main
script:
- echo "buld on main"
- pyb publish_artifacts
build_on_tag:
<<: *ddo
<<: *tag_only
stage: build_on_tag
script:
- echo "buld on tag"
- pyb publish_artifacts

View file

@ -18,6 +18,10 @@ def initialize(project):
"mixin_types": ["RELEASE"],
"release_primary_build_file": "build_to_test.py",
"release_secondary_build_files": ["package.json", "project.clj"],
"release_artifacts": [],
"release_artifact_server_url": "https://repo.prod.meissa.de",
"release_organisation": "meissa",
"release_repository_name": name,
}
project.build_depends_on("ddadevops>=4.0.0-dev")
@ -67,3 +71,11 @@ def build(project, release_type):
build = get_devops_build(project)
build.update_release_type(release_type)
nothing(project)
@task
def publish_artifacts(project):
build = get_devops_build(project)
print("RELEASE_ARTIFACT_TOKEN" in os.environ)
print(os.environ.get("RELEASE_ARTIFACT_TOKEN"))
build.publish_artifacts()