This commit is contained in:
2024-04-21 18:09:59 +02:00
parent f56b500d61
commit 7f416274d5
3 changed files with 10 additions and 2 deletions

View File

@@ -129,6 +129,8 @@ spec:
value: $(params.project-name)
- name: project-path
value: $(params.project-path)
- name: image-version
value: $(tasks.git-version.results.packageVersion)
taskRef:
name: auto-ci-detector
workspaces:

View File

@@ -25,6 +25,9 @@ spec:
- name: file-docker
description: list of Dockerfiles if any
type: array
- name: images-name
description: list of Dockerfiles image-name
type: array
params:
- name: toolbox-image
default: sebt3/basic-toolbox-image:1.30.0
@@ -40,6 +43,8 @@ spec:
- name: project-path
description: The path of the current project
type: string
- name: image-version
type: string
steps:
- name: detect-stages
image: $(params.toolbox-image)
@@ -137,6 +142,7 @@ spec:
ret = []
for f in dockerfiles:
dir = os.path.dirname(f)
ret.append("$(params.artifactory-url)/$(params.project-path):$(params.image-version)")
print('get_image_name', dir, root_dir)
return ret
def get_stages(files,root_dir):

View File

@@ -40,8 +40,8 @@ spec:
echo -n "${FullSemVer}" | tee $(results.gitVersion.path)
# normalize a bit because
# image tags can only contain `abcdefghijklmnopqrstuvwxyz0123456789_-.ABCDEFGHIJKLMNOPQRSTUVWXYZ`
PACKAGEVERSION=$(echo -n $FullSemVer | sed 's/[^-._0-9A-Za-z]/-/g')
echo -n "${PACKAGEVERSION}" | tee $(results.packageVersion.path)
packageVersion=$(echo -n $FullSemVer | sed 's/[^-._0-9A-Za-z]/-/g')
echo -n "${packageVersion}" | tee $(results.packageVersion.path)
workspaces:
- name: source
description: A workspace that contains the fetched git repository to create a version for.