Skip to content

Commit

Permalink
[v14] Remove Spacelift image build entries from drone (#35055) (#35060)
Browse files Browse the repository at this point in the history
* Remove Spacelift image build entries from drone (#35055)

* Rerun dronegen

* Resign drone yaml

* Resign drone.yml
  • Loading branch information
strideynet authored Nov 28, 2023
1 parent d1a937e commit eb73629
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 153 deletions.
120 changes: 1 addition & 119 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16483,123 +16483,6 @@ volumes:
image_pull_secrets:
- DOCKERHUB_CREDENTIALS

---
################################################
# Generated using dronegen, do not edit by hand!
# Use 'make dronegen' to update.
# Generated at dronegen/gha.go (main.ghaMultiBuildPipeline)
################################################

kind: pipeline
type: kubernetes
name: build-teleport-spacelift-runner-oci-images
trigger:
event:
include:
- tag
ref:
include:
- refs/tags/v*
repo:
include:
- gravitational/*
workspace:
path: /go
clone:
disable: true
steps:
- name: Check out code
image: docker:git
pull: if-not-exists
commands:
- mkdir -pv "/go/src/github.com/gravitational/teleport"
- cd "/go/src/github.com/gravitational/teleport"
- git init
- git remote add origin ${DRONE_REMOTE_URL}
- git fetch origin --tags
- git checkout -qf "${DRONE_COMMIT_SHA}"
- mkdir -m 0700 /root/.ssh && echo "$GITHUB_PRIVATE_KEY" > /root/.ssh/id_rsa &&
chmod 600 /root/.ssh/id_rsa
- ssh-keyscan -H github.com > /root/.ssh/known_hosts 2>/dev/null && chmod 600 /root/.ssh/known_hosts
- git submodule update --init e
- mkdir -pv /go/cache
- rm -f /root/.ssh/id_rsa
environment:
GITHUB_PRIVATE_KEY:
from_secret: GITHUB_PRIVATE_KEY
- name: Delegate build to GitHub
image: golang:1.18-alpine
pull: if-not-exists
commands:
- cd "/go/src/github.com/gravitational/teleport/build.assets/tooling"
- 'go run ./cmd/gh-trigger-workflow -owner ${DRONE_REPO_OWNER} -repo teleport.e
-tag-workflow -timeout 2h30m0s -workflow release-teleport-spacelift-runner-oci.yml
-workflow-ref=${DRONE_TAG} -input oss-teleport-repo=${DRONE_REPO} -input oss-teleport-ref=${DRONE_TAG} '
environment:
GHA_APP_KEY:
from_secret: GITHUB_WORKFLOW_APP_PRIVATE_KEY
image_pull_secrets:
- DOCKERHUB_CREDENTIALS

---
################################################
# Generated using dronegen, do not edit by hand!
# Use 'make dronegen' to update.
# Generated at dronegen/gha.go (main.ghaMultiBuildPipeline)
################################################

kind: pipeline
type: kubernetes
name: promote-teleport-spacelift-runner-oci-images
trigger:
event:
include:
- promote
target:
include:
- production
- promote-teleport-spacelift-runner
repo:
include:
- gravitational/*
workspace:
path: /go
clone:
disable: true
steps:
- name: Check out code
image: docker:git
pull: if-not-exists
commands:
- mkdir -pv "/go/src/github.com/gravitational/teleport"
- cd "/go/src/github.com/gravitational/teleport"
- git init
- git remote add origin ${DRONE_REMOTE_URL}
- git fetch origin --tags
- git checkout -qf "${DRONE_COMMIT_SHA}"
- mkdir -m 0700 /root/.ssh && echo "$GITHUB_PRIVATE_KEY" > /root/.ssh/id_rsa &&
chmod 600 /root/.ssh/id_rsa
- ssh-keyscan -H github.com > /root/.ssh/known_hosts 2>/dev/null && chmod 600 /root/.ssh/known_hosts
- git submodule update --init e
- mkdir -pv /go/cache
- rm -f /root/.ssh/id_rsa
environment:
GITHUB_PRIVATE_KEY:
from_secret: GITHUB_PRIVATE_KEY
- name: Delegate build to GitHub
image: golang:1.18-alpine
pull: if-not-exists
commands:
- cd "/go/src/github.com/gravitational/teleport/build.assets/tooling"
- 'go run ./cmd/gh-trigger-workflow -owner ${DRONE_REPO_OWNER} -repo teleport.e
-tag-workflow -timeout 2h30m0s -workflow promote-teleport-spacelift-runner-updater-oci.yml
-workflow-ref=${DRONE_TAG} -input "release-source-tag=${DRONE_TAG}" '
environment:
GHA_APP_KEY:
from_secret: GITHUB_WORKFLOW_APP_PRIVATE_KEY
image_pull_secrets:
- DOCKERHUB_CREDENTIALS

---
################################################
# Generated using dronegen, do not edit by hand!
Expand Down Expand Up @@ -16631,7 +16514,6 @@ depends_on:
- promote-teleport-oci-distroless-images
- promote-teleport-hardened-amis
- promote-teleport-kube-agent-updater-oci-images
- promote-teleport-spacelift-runner-oci-images
steps:
- name: Check if commit is tagged
image: alpine
Expand Down Expand Up @@ -16740,6 +16622,6 @@ image_pull_secrets:
- DOCKERHUB_CREDENTIALS
---
kind: signature
hmac: 4473e2d06a0de57e81dc8ee64e0c8de4ee055a4790947871a8708f6386552141
hmac: b21b22a73c61317b6cd4005514f1f59b2e44543e6f0a111f428398c14dab1e84

...
19 changes: 0 additions & 19 deletions dronegen/promote.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,6 @@ func promoteBuildPipelines() []pipeline {
updaterPipeline.Trigger.Target.Include = append(updaterPipeline.Trigger.Target.Include, "promote-updater")
promotePipelines = append(promotePipelines, updaterPipeline)

teleportSpaceliftRunnerPipeline := ghaBuildPipeline(ghaBuildType{
buildType: buildType{os: "linux", fips: false},
trigger: triggerPromote,
pipelineName: "promote-teleport-spacelift-runner-oci-images",
workflows: []ghaWorkflow{
{
name: "promote-teleport-spacelift-runner-updater-oci.yml",
timeout: 150 * time.Minute,
ref: "${DRONE_TAG}",
shouldTagWorkflow: true,
inputs: map[string]string{
"release-source-tag": "${DRONE_TAG}",
},
},
},
})
teleportSpaceliftRunnerPipeline.Trigger.Target.Include = append(teleportSpaceliftRunnerPipeline.Trigger.Target.Include, "promote-teleport-spacelift-runner")
promotePipelines = append(promotePipelines, teleportSpaceliftRunnerPipeline)

return promotePipelines
}

Expand Down
15 changes: 0 additions & 15 deletions dronegen/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,21 +233,6 @@ func tagPipelines() []pipeline {
},
}))

ps = append(ps, ghaBuildPipeline(ghaBuildType{
buildType: buildType{os: "linux", fips: false},
trigger: triggerTag,
pipelineName: "build-teleport-spacelift-runner-oci-images",
workflows: []ghaWorkflow{
{
name: "release-teleport-spacelift-runner-oci.yml",
srcRefVar: "DRONE_TAG",
ref: "${DRONE_TAG}",
timeout: 150 * time.Minute,
shouldTagWorkflow: true,
},
},
}))

// Also add CentOS artifacts
// CentOS 6 FIPS builds have been removed in Teleport 7.0. See https://github.com/gravitational/teleport/issues/7207
ps = append(ps, tagPipeline(buildType{os: "linux", arch: "amd64", centos7: true}))
Expand Down

0 comments on commit eb73629

Please sign in to comment.