Skip to content

Commit 2526de2

Browse files
feat: Add OneBranch pipelines for Fluentbit and Installer images
Add two OneBranch Official pipelines following the Billing pipeline pattern: 1. Fluentbit (pipeline.fluentbit.official.yml) - Builds from Dockerfile.fluentbit in ARO-RP - Publishes as artifact: fluentbit-image 2. Installer (pipeline.installer.official.yml) - Checks out openshift/installer-aro-wrapper - Builds from Dockerfile.aro - Publishes as artifact: aro-installer-image Both pipelines: - Use onebranch.pipeline.imagebuildinfo@1 - Save image to tar with metadata JSON - Publish artifacts for consumption by sdp-pipelines ImageMirror Sources confirmed from ARO-Pipelines/image/docker/README.md
1 parent d7fc72f commit 2526de2

File tree

2 files changed

+228
-0
lines changed

2 files changed

+228
-0
lines changed
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Fluentbit OneBranch Official Build Pipeline
2+
3+
trigger:
4+
branches:
5+
include:
6+
- master
7+
paths:
8+
include:
9+
- Dockerfile.fluentbit
10+
- .pipelines/onebranch/pipeline.fluentbit.official.yml
11+
- .pipelines/onebranch/templates/template-build-fluentbit.yml
12+
13+
pr: none
14+
15+
parameters:
16+
- name: FLUENTBIT_VERSION
17+
displayName: 'Fluent Bit Version'
18+
type: string
19+
default: '2.1.10'
20+
- name: MARINER_VERSION
21+
displayName: 'Azure Linux (Mariner) Version'
22+
type: string
23+
default: '20250701'
24+
25+
variables:
26+
- name: LinuxContainerImage
27+
value: "mcr.microsoft.com/onebranch/azurelinux/build:3.0"
28+
- name: BUILD_TAG
29+
value: '${{ parameters.FLUENTBIT_VERSION }}-cm${{ parameters.MARINER_VERSION }}'
30+
31+
resources:
32+
repositories:
33+
- repository: templates
34+
type: git
35+
name: OneBranch.Pipelines/GovernedTemplates
36+
ref: refs/heads/main
37+
38+
extends:
39+
template: v2/OneBranch.Official.CrossPlat.yml@templates
40+
parameters:
41+
featureFlags:
42+
LinuxHostVersion:
43+
Network: KS3
44+
globalSdl:
45+
policheck:
46+
break: true
47+
48+
stages:
49+
- stage: BuildFluentbitImage
50+
displayName: 'Build Fluentbit Container Image'
51+
jobs:
52+
- job: BuildImage
53+
displayName: 'Build and Package Fluentbit Image'
54+
pool:
55+
type: docker
56+
os: Linux
57+
variables:
58+
ob_git_checkout: true
59+
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)/image'
60+
steps:
61+
- task: onebranch.pipeline.imagebuildinfo@1
62+
displayName: 'Build Fluentbit Docker Image'
63+
inputs:
64+
repositoryName: fluentbit
65+
dockerFileRelPath: Dockerfile.fluentbit
66+
dockerFileContextPath: .
67+
enable_network: true
68+
enable_isolated_acr_push: false
69+
build_tag: $(BUILD_TAG)
70+
saveImageToPath: $(ob_outputDirectory)/image.tar
71+
buildkit: 1
72+
enable_service_tree_acr_path: false
73+
arguments: --build-arg VERSION=${{ parameters.FLUENTBIT_VERSION }} --build-arg MARINER_VERSION=${{ parameters.MARINER_VERSION }}
74+
75+
- task: Bash@3
76+
displayName: 'Create Image Metadata'
77+
inputs:
78+
targetType: 'inline'
79+
script: |
80+
set -euo pipefail
81+
82+
echo "Creating image metadata..."
83+
cat > $(ob_outputDirectory)/image-metadata.json << EOF
84+
{
85+
"build_tag": "$(BUILD_TAG)",
86+
"fluentbit_version": "${{ parameters.FLUENTBIT_VERSION }}",
87+
"mariner_version": "${{ parameters.MARINER_VERSION }}",
88+
"build_id": "$(Build.BuildId)",
89+
"build_number": "$(Build.BuildNumber)",
90+
"source_version": "$(Build.SourceVersion)",
91+
"source_branch": "$(Build.SourceBranchName)",
92+
"repository": "fluentbit",
93+
"dockerfile": "Dockerfile.fluentbit"
94+
}
95+
EOF
96+
97+
echo "Image metadata created:"
98+
cat $(ob_outputDirectory)/image-metadata.json
99+
100+
echo ""
101+
echo "Artifact contents:"
102+
ls -lh $(ob_outputDirectory)/
103+
104+
- task: PublishPipelineArtifact@1
105+
displayName: 'Publish Fluentbit Image Artifact'
106+
inputs:
107+
targetPath: '$(ob_outputDirectory)'
108+
artifact: 'fluentbit-image'
109+
publishLocation: 'pipeline'
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# ARO Installer OneBranch Official Build Pipeline
2+
3+
name: $(Date:yyyyMMdd).$(Rev:r)
4+
5+
trigger:
6+
branches:
7+
include:
8+
- master
9+
paths:
10+
include:
11+
- .pipelines/onebranch/pipeline.installer.official.yml
12+
- .pipelines/onebranch/templates/template-build-installer.yml
13+
14+
pr: none
15+
16+
parameters:
17+
- name: ARO_INSTALLER_BRANCH
18+
displayName: 'ARO Installer Branch (e.g., release-4.17)'
19+
type: string
20+
default: 'release-4.17'
21+
- name: ARO_INSTALLER_VERSION
22+
displayName: 'ARO Installer Version (e.g., 4.17)'
23+
type: string
24+
default: '4.17'
25+
- name: REGISTRY
26+
displayName: 'Base Registry'
27+
type: string
28+
default: 'arointsvc.azurecr.io'
29+
30+
variables:
31+
- name: LinuxContainerImage
32+
value: "mcr.microsoft.com/onebranch/azurelinux/build:3.0"
33+
- name: BUILD_TAG
34+
value: '${{ parameters.ARO_INSTALLER_BRANCH }}'
35+
36+
resources:
37+
repositories:
38+
- repository: templates
39+
type: git
40+
name: OneBranch.Pipelines/GovernedTemplates
41+
ref: refs/heads/main
42+
- repository: installer-aro-wrapper
43+
type: github
44+
name: openshift/installer-aro-wrapper
45+
endpoint: github.com_Azure
46+
ref: refs/heads/${{ parameters.ARO_INSTALLER_BRANCH }}
47+
48+
extends:
49+
template: v2/OneBranch.Official.CrossPlat.yml@templates
50+
parameters:
51+
featureFlags:
52+
LinuxHostVersion:
53+
Network: KS3
54+
globalSdl:
55+
policheck:
56+
break: true
57+
stages:
58+
- stage: BuildInstallerImage
59+
displayName: 'Build ARO Installer Container Image'
60+
jobs:
61+
- job: BuildImage
62+
displayName: 'Build and Package ARO Installer Image'
63+
pool:
64+
type: docker
65+
os: Linux
66+
variables:
67+
ob_git_checkout: true
68+
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)/image'
69+
steps:
70+
- checkout: installer-aro-wrapper
71+
displayName: 'Checkout installer-aro-wrapper'
72+
73+
- task: onebranch.pipeline.imagebuildinfo@1
74+
displayName: 'Build ARO Installer Docker Image'
75+
inputs:
76+
repositoryName: aro-installer
77+
dockerFileRelPath: Dockerfile.aro
78+
dockerFileContextPath: .
79+
enable_network: true
80+
enable_isolated_acr_push: false
81+
build_tag: $(BUILD_TAG)
82+
saveImageToPath: $(ob_outputDirectory)/image.tar
83+
buildkit: 1
84+
enable_service_tree_acr_path: false
85+
arguments: --build-arg VERSION=${{ parameters.ARO_INSTALLER_VERSION }} --build-arg REGISTRY=${{ parameters.REGISTRY }} --build-arg BUILDER_REGISTRY=${{ parameters.REGISTRY }}/openshift-release-dev/golang-builder--partner-share
86+
87+
- task: Bash@3
88+
displayName: 'Create Image Metadata'
89+
inputs:
90+
targetType: 'inline'
91+
script: |
92+
set -euo pipefail
93+
echo "Creating image metadata..."
94+
cat > $(ob_outputDirectory)/image-metadata.json << EOF
95+
{
96+
"build_tag": "$(BUILD_TAG)",
97+
"installer_version": "${{ parameters.ARO_INSTALLER_VERSION }}",
98+
"installer_branch": "${{ parameters.ARO_INSTALLER_BRANCH }}",
99+
"registry": "${{ parameters.REGISTRY }}",
100+
"build_id": "$(Build.BuildId)",
101+
"build_number": "$(Build.BuildNumber)",
102+
"source_version": "$(Build.SourceVersion)",
103+
"source_branch": "$(Build.SourceBranchName)",
104+
"repository": "aro-installer",
105+
"dockerfile": "Dockerfile.aro"
106+
}
107+
EOF
108+
echo "Image metadata created:"
109+
cat $(ob_outputDirectory)/image-metadata.json
110+
echo ""
111+
echo "Artifact contents:"
112+
ls -lh $(ob_outputDirectory)/
113+
114+
- task: PublishPipelineArtifact@1
115+
displayName: 'Publish ARO Installer Image Artifact'
116+
inputs:
117+
targetPath: '$(ob_outputDirectory)'
118+
artifact: 'aro-installer-image'
119+
publishLocation: 'pipeline'

0 commit comments

Comments
 (0)