Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize Jenkins jobs #95

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ properties([
]),
])

env.BASHBREW_ARCH = env.JOB_NAME.split('/')[-1].minus('build-') // "windows-amd64", "arm64v8", etc
env.BASHBREW_ARCH = env.JOB_NAME.minus('/build').split('/')[-1] // "windows-amd64", "arm64v8", etc
env.BUILD_ID = params.buildId

node('multiarch-' + env.BASHBREW_ARCH) { ansiColor('xterm') {
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ properties([
userBoost: true,
]),
pipelineTriggers([
upstream('meta'),
upstream('../meta'),
cron('H H/6 * * *'), // run every few hours whether we "need" it or not
]),
])

env.BASHBREW_ARCH = env.JOB_NAME.split('/')[-1].minus('deploy-') // "windows-amd64", "arm64v8", etc
env.BASHBREW_ARCH = env.JOB_NAME.minus('/deploy').split('/')[-1] // "windows-amd64", "arm64v8", etc

node('put-shared') { ansiColor('xterm') {
stage('Checkout') {
Expand Down
15 changes: 5 additions & 10 deletions Jenkinsfile.trigger
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ properties([
]),
])

env.BASHBREW_ARCH = env.JOB_NAME.split('/')[-1].minus('trigger-') // "windows-amd64", "arm64v8", etc
env.BASHBREW_ARCH = env.JOB_NAME.minus('/trigger').split('/')[-1] // "windows-amd64", "arm64v8", etc

def queue = []
def breakEarly = false // thanks Jenkins...
Expand Down Expand Up @@ -63,15 +63,10 @@ node {
.[]
| select(
needs_build
and (
.build.arch as $arch
| if env.BASHBREW_ARCH == "gha" then
[ "amd64", "i386", "windows-amd64" ]
else [ env.BASHBREW_ARCH ] end
| index($arch)
)
and .build.arch == env.BASHBREW_ARCH
)
| if env.BASHBREW_ARCH == "gha" then
| if .build.arch | IN("amd64", "i386", "windows-amd64") then
# "GHA" architectures (anything we add a "gha_payload" to will be run on GHA in the queue)
.gha_payload = (gha_payload | @json)
else . end
]
Expand Down Expand Up @@ -137,7 +132,7 @@ for (buildObj in queue) {
}
} else {
def res = build(
job: 'build-' + env.BASHBREW_ARCH,
job: 'build',
parameters: [
string(name: 'buildId', value: buildObj.buildId),
],
Expand Down