mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-12 02:15:01 +00:00
Fixed enterprise and fips OS packages not uploading to OS package repositories when promoting in the context of private git repos (#21163)
This commit is contained in:
+9
-3
@@ -6797,6 +6797,7 @@ trigger:
|
||||
repo:
|
||||
include:
|
||||
- gravitational/teleport
|
||||
- gravitational/teleport-private
|
||||
workspace:
|
||||
path: /go
|
||||
clone:
|
||||
@@ -6848,7 +6849,9 @@ steps:
|
||||
commands:
|
||||
- mkdir -pv "$ARTIFACT_PATH"
|
||||
- rm -rf "$ARTIFACT_PATH"/*
|
||||
- aws s3 sync --no-progress --delete --exclude "*" --include "*.deb*" s3://$AWS_S3_BUCKET/teleport/tag/${DRONE_TAG##v}/
|
||||
- if [ "${DRONE_REPO_PRIVATE}" = true ]; then ENT_FILTER="*ent"; fi
|
||||
- FILTER="${ENT_FILTER}*.deb*"
|
||||
- aws s3 sync --no-progress --delete --exclude "*" --include "$FILTER" s3://$AWS_S3_BUCKET/teleport/tag/${DRONE_TAG##v}/
|
||||
"$ARTIFACT_PATH"
|
||||
environment:
|
||||
ARTIFACT_PATH: /go/artifacts
|
||||
@@ -7000,6 +7003,7 @@ trigger:
|
||||
repo:
|
||||
include:
|
||||
- gravitational/teleport
|
||||
- gravitational/teleport-private
|
||||
workspace:
|
||||
path: /go
|
||||
clone:
|
||||
@@ -7051,7 +7055,9 @@ steps:
|
||||
commands:
|
||||
- mkdir -pv "$ARTIFACT_PATH"
|
||||
- rm -rf "$ARTIFACT_PATH"/*
|
||||
- aws s3 sync --no-progress --delete --exclude "*" --include "*.rpm*" s3://$AWS_S3_BUCKET/teleport/tag/${DRONE_TAG##v}/
|
||||
- if [ "${DRONE_REPO_PRIVATE}" = true ]; then ENT_FILTER="*ent"; fi
|
||||
- FILTER="${ENT_FILTER}*.rpm*"
|
||||
- aws s3 sync --no-progress --delete --exclude "*" --include "$FILTER" s3://$AWS_S3_BUCKET/teleport/tag/${DRONE_TAG##v}/
|
||||
"$ARTIFACT_PATH"
|
||||
environment:
|
||||
ARTIFACT_PATH: /go/artifacts
|
||||
@@ -19032,6 +19038,6 @@ volumes:
|
||||
temp: {}
|
||||
---
|
||||
kind: signature
|
||||
hmac: c08321db70831cf69a24749c1143467af86aef0dc26d262478827a3815e52e4e
|
||||
hmac: 21a11c7790b9e369c34f99e45f3b24df20dcd822bc4beb1c3d27f76bec331298
|
||||
|
||||
...
|
||||
|
||||
@@ -193,7 +193,10 @@ func (optpb *OsPackageToolPipelineBuilder) buildPromoteOsPackagePipeline() pipel
|
||||
|
||||
p := optpb.buildBaseOsPackagePipeline(pipelineName, checkoutPath, commitName)
|
||||
p.Trigger = triggerPromote
|
||||
p.Trigger.Repo.Include = []string{"gravitational/teleport"}
|
||||
p.Trigger.Repo.Include = []string{
|
||||
"gravitational/teleport",
|
||||
"gravitational/teleport-private",
|
||||
}
|
||||
|
||||
setupSteps := []step{
|
||||
verifyTaggedStep(),
|
||||
@@ -369,13 +372,17 @@ func (optpb *OsPackageToolPipelineBuilder) getVersionSteps(codePath, version str
|
||||
"mkdir -pv \"$ARTIFACT_PATH\"",
|
||||
// Clear out old versions from previous steps
|
||||
"rm -rf \"$ARTIFACT_PATH\"/*",
|
||||
// Conditionally match ONLY enterprise and fips binaries based off of file name,
|
||||
// if running in the context of a private repo (teleport-private)
|
||||
"if [ \"${DRONE_REPO_PRIVATE}\" = true ]; then ENT_FILTER=\"*ent\"; fi",
|
||||
fmt.Sprintf("FILTER=\"${ENT_FILTER}*.%s*\"", optpb.packageType),
|
||||
strings.Join(
|
||||
[]string{
|
||||
"aws s3 sync",
|
||||
"--no-progress",
|
||||
"--delete",
|
||||
"--exclude \"*\"",
|
||||
fmt.Sprintf("--include \"*.%s*\"", optpb.packageType),
|
||||
"--include \"$FILTER\"",
|
||||
fmt.Sprintf("s3://$AWS_S3_BUCKET/teleport/tag/%s/", bucketFolder),
|
||||
"\"$ARTIFACT_PATH\"",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user