Skip to content

Commit 4eced2c

Browse files
authored
Generate published package URL as part of new pipeline step (mariadb-corporation#2800)
* Generate published package URL as part of pipeline step * Pull publish_pkg_url into local variable * Add dependency on 'publish pkg' step
1 parent b53c231 commit 4eced2c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.drone.jsonnet

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ local Pipeline(branch, platform, event, arch='amd64', server='10.6-enterprise')
117117
local brancht = if (branch == '**') then '' else branch + '-',
118118
local result = std.strReplace(std.strReplace(platform, ':', ''), '/', '-'),
119119

120+
local publish_pkg_url = "https://cspkg.s3.amazonaws.com/index.html?prefix=" + branchp + event + "/${DRONE_BUILD_NUMBER}/" + server + "/" + arch + "/" + result + "/",
121+
120122
local container_tags = if (event == 'cron') then [brancht + std.strReplace(event, '_', '-') + '${DRONE_BUILD_NUMBER}', brancht] else [brancht + std.strReplace(event, '_', '-') + '${DRONE_BUILD_NUMBER}'],
121123
local container_version = branchp + event + '/${DRONE_BUILD_NUMBER}/' + server + '/' + arch,
122124

@@ -627,6 +629,16 @@ local Pipeline(branch, platform, event, arch='amd64', server='10.6-enterprise')
627629
},
628630
] +
629631
[pipeline.publish()] +
632+
[
633+
{
634+
name: 'publish pkg url',
635+
depends_on: ['publish pkg'],
636+
image: 'alpine/git',
637+
commands: [
638+
"echo -e '\\e]8;;" + publish_pkg_url + "\\e\\\\" + publish_pkg_url + "\\e]8;;\\e\\\\'"
639+
]
640+
}
641+
] +
630642
(if (event == 'cron') then [pipeline.publish('pkg latest', 'latest')] else []) +
631643
[pipeline.smoke] +
632644
[pipeline.smokelog] +

0 commit comments

Comments
 (0)