Skip to content

Commit

Permalink
initial temurin rewrite (adoptium#2601)
Browse files Browse the repository at this point in the history
* initial temurin rewrite

* martijn fixes

* Update README.md
  • Loading branch information
gdams authored May 10, 2021
1 parent 0d358c4 commit 1dfd072
Show file tree
Hide file tree
Showing 36 changed files with 177 additions and 199 deletions.
2 changes: 1 addition & 1 deletion .azure-devops/build/steps/shared/before.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ steps:
- checkout: self

# set the FILENAME environment varialbe
# based on https://github.com/AdoptOpenJDK/openjdk-build/blob/master/pipelines/build/common/openjdk_build_pipeline.groovy#L374
# based on https://github.com/adoptium/temurin-build/blob/master/pipelines/build/common/openjdk_build_pipeline.groovy#L374
# TODO: support more options
- bash: |
# convert JAVA_TO_BUILD to upper case
Expand Down
2 changes: 1 addition & 1 deletion .azure-devops/openjdk-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "AdoptOpenJDK-$(JAVA_TO_BUILD)-$(Date:yyyy-MM-dd)"
name: "Adoptium-$(JAVA_TO_BUILD)-$(Date:yyyy-MM-dd)"

trigger: none

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/build-issue.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: 🐛 Bug Report
about: For problems related to how the adoptopenjdk binaries are created or published
about: For problems related to how the Temurin binaries are created or published

---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: 📚 Documentation update
about: Request for updates to the documentation about building AdoptOpenJDK
about: Request for updates to the documentation about building Temurin
labels: 'documentation'
---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ about: Suggest a new feature for this project
labels: 'enhancement'
---

Features that impact the whole project (e.g. Adding a new OpenJDK distribution)are made over at the [TSC](https://github.com/AdoptOpenJDK/TSC/).
Features that impact the whole project (e.g. Adding a new OpenJDK distribution)are made over at the [adoptium](https://github.com/adoptium/adoptium/).

Otherwise, please describe what enhancement you would like to see in the build
scripts:
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/not-sure-where-to-raise-an-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ about: No sure where to raise the issue?

Unsure where to raise something? Here are some of the common places:
- If your issue is due to the way OpenJDK is built, then this is the repository to raise it in - Describe your problem below
- If your issue is related to our installers (as opposed to tgz/zip downloads) raise it in [openjdk-installer](https://github.com/AdoptOpenJDK/openjdk-installer/)
- If your issue is related to and end-user visible issue with the JDK, or an underlying java bug, please raise it in [openjdk-support](https://github.com/AdoptOpenJDK/openjdk-support/issues)
- Otherwise, take a look at our TSC repository directory [here](https://github.com/AdoptOpenJDK/TSC/#dependent-projects). If you're still not sure then join our [slack channel[(http://adoptopenjdk.net/slack) and ask on `#general`
- If your issue is related to our installers (as opposed to tgz/zip downloads) raise it in [installer](https://github.com/adoptium/installer/)
- If your issue is related to and end-user visible issue with the JDK, or an underlying java bug, please raise it in [adoptium-support](https://github.com/adoptium/adoptium-support/issues)

**Problem description:**
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
os: [linux]
version: [jdk8u, jdk11u, jdk16u, jdk]
vm: [hotspot, openj9]
vm: [hotspot]
image: [adoptopenjdk/centos7_build_image]
include:
- os: alpine-linux
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Contact the Eclipse Foundation Webdev team via [email protected].

## Issues and Enhancements

Please let us know via our [issue tracker](https://github.com/AdoptOpenJDK/openjdk-build/issues) if you find a problem, even if you don't have a fix for it. The ideal issue report should be descriptive, and where possible include the steps we can take to reproduce the problem for ourselves.
Please let us know via our [issue tracker](https://github.com/adoptium/temurin-build/issues) if you find a problem, even if you don't have a fix for it. The ideal issue report should be descriptive, and where possible include the steps we can take to reproduce the problem for ourselves.

If you have a proposed fix for an issue, or an enhancement you would like to make to the code please describe it in an issue, then send us the code as a [Github pull request](https://help.github.com/articles/about-pull-requests) as described below.

Expand All @@ -47,7 +47,7 @@ We use GitHub's pull requests (PRs) as the primary way to accept contributions t

Consider whether the project documentation or tests also need updating as part of your change, and make that part of the same logical issue and PR. Open your PR against the master branch of the project.

To keep track of [the pull requests we are managing](https://github.com/AdoptOpenJDK/openjdk-build/pulls) we ask that you follow these guidelines for structuring the pull request title and comment.
To keep track of [the pull requests we are managing](https://github.com/adoptium/temurin-build/pulls) we ask that you follow these guidelines for structuring the pull request title and comment.

### Pull request title

Expand All @@ -61,7 +61,7 @@ Where your PR fixes an issue, it should include a reference to the issue's ident

### Licensing and Developer certificate of origin

When you submit any copyrighted material to the project via a pull request, issue tracker, or any other means, you agree to license the material under [the project's open source license](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/LICENSE), and warrant that you have the legal authority to do so, whether or not you state this explicitly.
When you submit any copyrighted material to the project via a pull request, issue tracker, or any other means, you agree to license the material under [the project's open source license](https://github.com/adoptium/temurin-build/blob/master/LICENSE), and warrant that you have the legal authority to do so, whether or not you state this explicitly.

We ask that you include a line similar to the following as part of your pull request comment or individual commit comments:

Expand All @@ -77,17 +77,17 @@ By adding this simple comment, you are telling the community that you wrote the
### Source file headers

All the project's source files must start with a comment, as near to the top of the file as practical, that includes a reference to [the project license](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/LICENSE). Take a look at some existing files to see how we do that, and if there are any questions just ask. In some cases, such as small, trivial files, or source files generated by tooling we don't reference the license again, but it still applies wherever the file contains copyrightable material.
All the project's source files must start with a comment, as near to the top of the file as practical, that includes a reference to [the project license](https://github.com/adoptium/temurin-build/blob/master/LICENSE). Take a look at some existing files to see how we do that, and if there are any questions just ask. In some cases, such as small, trivial files, or source files generated by tooling we don't reference the license again, but it still applies wherever the file contains copyrightable material.

We don't place explicit copyright statements in the project source files. The project comprises many distinct pieces of code, spread across numerous source files, and authored by a variety of individuals. Managing copyright statements is unproductive and [can lead to confusion and contention around the edge cases](https://opensource.com/law/14/n2/copyright-statements-source-files). Rather we utilize [the NOTICE file](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/NOTICE) mechanism as a way to acknowledge copyright broadly where there is a valid reason to do so.
We don't place explicit copyright statements in the project source files. The project comprises many distinct pieces of code, spread across numerous source files, and authored by a variety of individuals. Managing copyright statements is unproductive and [can lead to confusion and contention around the edge cases](https://opensource.com/law/14/n2/copyright-statements-source-files). Rather we utilize [the NOTICE file](https://github.com/adoptium/temurin-build/blob/master/NOTICE) mechanism as a way to acknowledge copyright broadly where there is a valid reason to do so.

Finally, for similar reasons to avoiding individual copyright statements, we don't maintain `@author` tags in source files. There are good arguments to suggest that [author tags discourage open contribution](https://producingoss.com/en/managing-volunteers.html#territoriality), and we depend upon Git to maintain that information for the project.

### Ensuring high quality

If you're changing a shellscript, please make sure you run [shellcheck](https://github.com/koalaman/shellcheck) before submitting your PR. This will also run in a GitHub check titled `Linter` to ensure you comply to our coding style guidelines (alongside a lot of other linters for different formats).

After we receive your pull request our [GitHub Checks](https://github.com/AdoptOpenJDK/openjdk-build/tree/master/.github/workflows) will test your changes.
After we receive your pull request our [GitHub Checks](https://github.com/adoptium/temurin-build/tree/master/.github/workflows) will test your changes.
If you're making any changes to our groovy files, you'll be more interested in our [pr-tester](https://ci.adoptopenjdk.net/view/build-tester/job/build-scripts-pr-tester/job/openjdk-build-pr-tester/) jenkins job which executes a set of test pipelines in a semi-live environment. Watch for the results posted as a comment to the PR, investigate and fix any failures.
Please see the [Testing.md](Testing.md) for more information on any of this.

Expand Down
45 changes: 18 additions & 27 deletions FAQ.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
# openjdk-build FAQ
# temurin-build FAQ

This document covers cover how to perform various repeatable tasks in the
repository that might not otherwise be obvious from just looking at the
repository.

## Access control in this repository
## How do I find my way around Temurin's build automation scripts?

The GitHub teams relevant to this repository are as follows (Note, you
won't necessarily have access to see these links):

- [GetOpenJDK](https://github.com/orgs/AdoptOpenJDK/teams/getopenjdk) - `Triage` level of access which lets you assign issues to people
- [build](https://github.com/orgs/AdoptOpenJDK/teams/build) - `Write` access which lets you approve and merge PRs and run and configure most Jenkins jobs
- [release](https://github.com/orgs/AdoptOpenJDK/teams/build) - Allows you to run the release jobs in Jenkins

## How do I find my way around AdoptOpenJDK's build automation scripts?

I wrote this diagram partially for my own benefit in [issue 957](https://github.com/AdoptOpenJDK/openjdk-build/issues/957) that lists the shell scripts (`S`) and environment scripts (`E`). I think it would be useful to incorporate this into the documentation (potentially annotated with a bit more info) so people can find their way around the myriad of script levels that we now have.
I wrote this diagram partially for my own benefit in [issue 957](https://github.com/adoptium/temurin-build/issues/957) that lists the shell scripts (`S`) and environment scripts (`E`). I think it would be useful to incorporate this into the documentation (potentially annotated with a bit more info) so people can find their way around the myriad of script levels that we now have.
Note that the "end-user" scripts start at `makejdk-any-platform.sh` and a
diagram of those relationships can be seen [here](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/docs/images/AdoptOpenJDK_Build_Script_Relationships.png)
diagram of those relationships can be seen [here](https://github.com/adoptium/temurin-build/blob/master/docs/images/AdoptOpenJDK_Build_Script_Relationships.png)

*See the [ci-jenkins-pipelines FAQ.md](https://github.com/AdoptOpenJDK/ci-jenkins-pipelines/blob/master/FAQ.md#how-do-i-find-my-way-around-adoptopenjdks-build-automation-scripts) for the Jenkins side of the pipeline*
*See the [ci-jenkins-pipelines FAQ.md](https://github.com/adoptium/ci-jenkins-pipelines/blob/master/FAQ.md#how-do-i-find-my-way-around-adoptopenjdks-build-automation-scripts) for the Jenkins side of the pipeline*

```markdown
G - make-adopt-build-farm.sh
Expand All @@ -42,7 +33,7 @@ There is also some documentation in [CHANGELOG.md](CHANGELOG.md)
## What are the prerequisites for a system used for builds?

- The upstream OpenJDK build requirements are at [Supported Build Platforms](https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms)
- The AdoptOpenJDK levels we build on are in [Minimum-OS-levels](https://github.com/AdoptOpenJDK/openjdk-build/wiki/%5BWIP%5D-Minimum-OS-levels) although anything with comparable equivalent or later C libraries should work ok (in particular we have built on most current Linux distros without issues)
- The Temurin levels we build on are in [Minimum-OS-levels](https://github.com/adoptium/temurin-build/wiki/%5BWIP%5D-Minimum-OS-levels) although anything with comparable equivalent or later C libraries should work ok (in particular we have built on most current Linux distros without issues)

In terms of compilers, these are what we currently use for each release:

Expand All @@ -58,30 +49,30 @@ In terms of compilers, these are what we currently use for each release:
| JDK11 | macos | clang-700.1.81 |
| JDK13+ | macos | clang-900.0.39.2 |

All machines at AdoptOpenJDK are set up using the ansible playbooks from the
All machines at Temurin are set up using the ansible playbooks from the
[infrastructure](https://github.com/adoptopenjdk/openjdk-infrastructure) repository.

## How do I change the parameters, such as configure flags, for a Jenkins build

Where you change them depends on the scope of the parameter or flag:

- *If the parameter will affect all users, regardless of environment or OS/Arch*
- [build.sh](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/sbin/build.sh) OR [makejdk-any-platform.sh](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/makejdk-any-platform.sh) depending on how high up in the execution stack it needs to be.
- [Example PR - Adding a new archival feature for OpenJ9 memory dumps](https://github.com/AdoptOpenJDK/openjdk-build/pull/2464)
- [build.sh](https://github.com/adoptium/temurin-build/blob/master/sbin/build.sh) OR [makejdk-any-platform.sh](https://github.com/adoptium/temurin-build/blob/master/makejdk-any-platform.sh) depending on how high up in the execution stack it needs to be.
- [Example PR - Adding a new archival feature for OpenJ9 memory dumps](https://github.com/adoptium/temurin-build/pull/2464)
- *If the parameter will affect all machines of a specific OS OR related to the environment set up by [our ansible scripts](https://github.com/AdoptOpenJDK/openjdk-infrastructure) at the shell script level*
- Modify the relevant environment files in [platform-specific-configurations](https://github.com/AdoptOpenJDK/openjdk-build/tree/master/build-farm/platform-specific-configurations)
- [Example PR - Adding a new configure flag for OpenJ9 on all AIX machines](https://github.com/AdoptOpenJDK/openjdk-build/pull/1442/files)
- Modify the relevant environment files in [platform-specific-configurations](https://github.com/adoptium/temurin-build/tree/master/build-farm/platform-specific-configurations)
- [Example PR - Adding a new configure flag for OpenJ9 on all AIX machines](https://github.com/adoptium/temurin-build/pull/1442/files)
- *If the parameter will affect only our jenkins environment or jenkins machine environment*
- Modify the [pipeline files](https://github.com/AdoptOpenJDK/ci-jenkins-pipelines/tree/master/pipelines/build), although this is normally only done for configuration differences such as OpenJ9 Large Heap builds. See [the configuration file documentation](https://github.com/AdoptOpenJDK/ci-jenkins-pipelines#configuration-files) for more information about adding or altering custom jenkins param.
- [Example PR - Adding Jenkins Support for a Cross Compiled Bisheng Binary](https://github.com/AdoptOpenJDK/ci-jenkins-pipelines/pull/68)
- Modify the [pipeline files](https://github.com/adoptium/ci-jenkins-pipelines/tree/master/pipelines/build), although this is normally only done for configuration differences such as OpenJ9 Large Heap builds. See [the configuration file documentation](https://github.com/adoptium/ci-jenkins-pipelines#configuration-files) for more information about adding or altering custom jenkins param.
- [Example PR - Adding Jenkins Support for a Cross Compiled Bisheng Binary](https://github.com/adoptium/ci-jenkins-pipelines/pull/68)

### TL;DR (Quick Reference Table)

| Parameter Location | Impact |
| --- | --- |
| [build.sh](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/sbin/build.sh) OR [makejdk-any-platform.sh](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/makejdk-any-platform.sh) | Anyone (including end users) who are running [makejdk-any-platform.sh](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/makejdk-any-platform.sh) |
| [platform-specific-configurations](https://github.com/AdoptOpenJDK/openjdk-build/tree/master/build-farm/platform-specific-configurations) scripts | Those using [build-farm/make-adopt-build-farm.sh](https://github.com/AdoptOpenJDK/openjdk-build/blob/master/build-farm/make-adopt-build-farm.sh) (inc. our pipelines) - should be stuff specific to our machines |
| Jenkins resources in [ci-jenkins-pipelines](https://github.com/AdoptOpenJDK/ci-jenkins-pipelines) | Only when run through our jenkins pipelines. See the [configuration file documentation](https://github.com/AdoptOpenJDK/ci-jenkins-pipelines#configuration-files) for more information |
| [build.sh](https://github.com/adoptium/temurin-build/blob/master/sbin/build.sh) OR [makejdk-any-platform.sh](https://github.com/adoptium/temurin-build/blob/master/makejdk-any-platform.sh) | Anyone (including end users) who are running [makejdk-any-platform.sh](https://github.com/adoptium/temurin-build/blob/master/makejdk-any-platform.sh) |
| [platform-specific-configurations](https://github.com/adoptium/temurin-build/tree/master/build-farm/platform-specific-configurations) scripts | Those using [build-farm/make-adopt-build-farm.sh](https://github.com/adoptium/temurin-build/blob/master/build-farm/make-adopt-build-farm.sh) (inc. our pipelines) - should be stuff specific to our machines |
| Jenkins resources in [ci-jenkins-pipelines](https://github.com/adoptium/ci-jenkins-pipelines) | Only when run through our jenkins pipelines. See the [configuration file documentation](https://github.com/adoptium/ci-jenkins-pipelines#configuration-files) for more information |

## How to do a new release build

Expand All @@ -97,9 +88,9 @@ For more information, see the [PR testing documentation](Testing.md).
## Which OS levels do we build on?

The operating systems/distributions which we build or are documented in the
[openjdk-build wiki](https://github.com/AdoptOpenJDK/openjdk-build/wiki/%5BWIP%5D-Minimum-OS-levels).
[temurin-build wiki](https://github.com/adoptium/temurin-build/wiki/%5BWIP%5D-Minimum-OS-levels).
Runtime platforms are in our [supported platforms page](https://adoptium.net/supported_platforms.html).

## How to add a new build pipeline param and associated job configuration?

[This PR](https://github.com/AdoptOpenJDK/openjdk-build/pull/2416) demonstrates changes required to add a new build pipeline param and the associated version/platform job configurations for setting the value when needed (note, the `pipelines/` dir has since been moved to our [jenkins repository](https://github.com/AdoptOpenJDK/ci-jenkins-pipelines)).
[This PR](https://github.com/adoptium/temurin-build/pull/2416) demonstrates changes required to add a new build pipeline param and the associated version/platform job configurations for setting the value when needed (note, the `pipelines/` dir has since been moved to our [jenkins repository](https://github.com/adoptium/ci-jenkins-pipelines)).
Loading

0 comments on commit 1dfd072

Please sign in to comment.