diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md new file mode 100644 index 0000000000..caccf5c513 --- /dev/null +++ b/docs/ARCHITECTURE.md @@ -0,0 +1,48 @@ + +# Architecture + +Our build farm has a number of major components: + +1. Jenkins Build Pipeline Configuration +1. Adopt build scripts +1. Supporting libraries + +## Process + +A rough structure of the build is as follows +![Structure](images/structure.svg) + +### Jenkins Job + +#### Regenerate Jobs +Jenkins CI jobs are generated by the [regeneration pipelines](pipelines/build/regeneration) in Jenkins. The documentation for +this process can be found at [regeneration docs](pipelines/build/regeneration/README.md), however they generate the jobs +at https://ci.adoptopenjdk.net/job/build-scripts/ which are the builds that coordinate the entire process of nightly +and release builds. + +#### Pipeline Jobs +These are the initial scripts that are the top level jobs that are invoked, this in turn invokes the downstream build +jobs for each configuration/platform then coordinates deploying the results to Github. The majority of the code that +defines this stage is contained within [build_base_file.groovy](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/pipelines/build/common/build_base_file.groovy). + +#### Indiviual Build Jobs +This are invoked by the parent pipeline job and each build creates the archives/installers for a given platform. The majority +of this code is defined in [openjdk_build_pipeline.groovy](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/pipelines/build/common/openjdk_build_pipeline.groovy). + +#### Build farm scripts +These are the entry point for the build itself when it executes on the end node. These are cross platform shell scripts +defined in [build-farm](https://github.com/AdoptOpenJDK/openjdk-build/tree/master/build-farm) and are kicked off by running +[make-adopt-build-farm.sh](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/build-farm/make-adopt-build-farm.sh). +This load configuration/setup that is specific to the adopt build farm and the current architecture before +invoking the build scripts. + +#### Build Scripts +These are the cross platform scripts that invoke the actual build. When inside the build farm they are executed +from [make-adopt-build-farm.sh](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/build-farm/make-adopt-build-farm.sh). +The initial entry point for these scripts is [makejdk-any-platform.sh](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/makejdk-any-platform.sh) +and the majority of the code for this step is contained within [sbin](https://github.com/AdoptOpenJDK/openjdk-build/tree/master/sbin). + +#### adopt-shared-lib + +The [adopt-shared-lib](https://github.com/AdoptOpenJDK/openjdk-build/tree/master/pipelines/library/src) is a Groovy library that provides a number of helper classes to the other parts of the build process such +as a version parser, metadata file and build configuration definitions. \ No newline at end of file diff --git a/docs/images/structure.svg b/docs/images/structure.svg new file mode 100644 index 0000000000..f53b882c4d --- /dev/null +++ b/docs/images/structure.svg @@ -0,0 +1,1187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Regenerate JobsType: Jenkins GroovyCode: https://github.com/AdoptOpenJDK/openjdk-build/tree/master/pipelines/build/regenerationCI Location: https://ci.adoptopenjdk.net/job/build-scripts/job/utils/ + id22 id23 + + + + + + + + Pipeline JobsType: Jenkins GroovyCode: https://github.com/AdoptOpenJDK/openjdk-build/tree/master/pipelines/buildCI Location: https://ci.adoptopenjdk.net/job/build-scripts/ + id24 id25 + + + + + + + + Generates + + + + + + + + Build Job TemplateType: Jenkins GroovyCode: https://github.com/AdoptOpenJDK/openjdk-build/blob/master/pipelines/build/common/build_base_file.groovy + id26 + + + + + + + + Build ConfigurationType: Jenkins GroovyCode: https://github.com/AdoptOpenJDK/openjdk-build/tree/master/pipelines/jobs/configurations + id27 + + + + + + + + Load buildtemplate + + + + + + + + Inject Config + + + + + + + + Individual Jenkins Build JobsType: Jenkins GroovyCode: https://github.com/AdoptOpenJDK/openjdk-build/blob/master/pipelines/build/common/create_job_from_template.groovyhttps://github.com/AdoptOpenJDK/openjdk-build/blob/master/pipelines/build/common/openjdk_build_pipeline.groovyCI Location: https://ci.adoptopenjdk.net/job/build-scripts/job/jobs/job/jdk11u/job/jdk11u-linux-x64-hotspot/ + id28 id29 id30 + + + + + + + + Build Farm ScriptsType: Bash ShellCode: https://github.com/AdoptOpenJDK/openjdk-build/tree/master/build-farm + id31 + + + + + + + + Platform Specific ConfigurationType: Bash ShellCode: https://github.com/AdoptOpenJDK/openjdk-build/tree/master/build-farm/platform-specific-configurations + id32 + + + + + + + + Build ScriptsType: Bash ShellCode: https://github.com/AdoptOpenJDK/openjdk-build/blob/master/makejdk-any-platform.sh + id33 + + + + + + + + adopt-shared-libType: GroovyCode: https://github.com/AdoptOpenJDK/openjdk-build/tree/master/pipelines/library/src + id34 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Invokes + + + + + + + + Invokes + + + + + + + + Invokes + + + + + + + + + + + + \ No newline at end of file