Skip to content

Commit

Permalink
Docker inages (#1)
Browse files Browse the repository at this point in the history
* add first set of perf machines (adoptium#1038)

* Fixed X11 Install from AIX Ansible Playbook (adoptium#969)

* Added X11.vfb to AIX playbook

* Adding XLC16 to aix playbook as its a requirement for JDK13 (adoptium#773)


Signed-off-by: Joe deKoning <joe_dekoning@ca.ibm.com>

* pbTests: Don't specify URL when git pulling (adoptium#1035)

* pbTests: Don't specify URL when git pulling (adoptium#1035)

* winPB: Change Git version to latest; use win_shell module (adoptium#1039)

* UnixPB: Added retries to roles that often fail (adoptium#1011)

* pbTests: Update testJDK.sh (adoptium#1040)

* UnixPB: Changes so PB runs on Raspbian Buster (adoptium#1036)

* pbTests: Find correct JDK versions for different OSs (adoptium#1034)

Check and set correct Java_8 for CentOS And Ubuntu

* pbTests: Refactor and clean-workspace option (adoptium#1030)

* pbTests: Refactor and clean-workspace option

* pbTests: Clean up checkLogFiles function

* pbTests: Removal of -b option in the build and test commands

* pbTests: Fixed pbFailed var assignment (adoptium#1046)

* Passed the value of hosts from command line (adoptium#1017)

- The variable groups['Vendor_groups']
is skipped due to lack of definition when we
run AdoptOpenJDK Unix Playbook internally

- Replaced it with a command line variable
and set the value to all or a specific group

[skip ci]

Signed-off-by: Jenny Chen <Jenny.Chen@ibm.com>

* pbTests: Altered Windows Scripts to build and test (adoptium#1053)

* UnixPB: Debian Fixes + trailing space fix (adoptium#1052)

* UnixPB: Fixed incorrectly named modules

* Unix: Add Deb8 IP config for ansible, fix trailing space

* pbTests: Put vagrant reload in the right place (adoptium#1055)

* add missing swap_file tag (adoptium#1054)

* add additional aarch64 test machines (adoptium#1050)

* add additional aarch64 test machines

* add missing deps

* WinPB: Fix the Git installation for Windows (adoptium#1047)

* WinPB: Create Git properties file and use for installation

* WinPB: Set autocrlf to false in Cygwin Git

* UnixPB: Add checksums to all `get_url` modules (adoptium#1051)

* UnixPB: 1st Group of Checksums

* UnixPB: 2nd Group of Checksums

* Fix earlier swap_file tag indentation (adoptium#1057)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* WinPB: Added Checksums to win_get_url modules (adoptium#1058)

* pbTests: Renamed testScript.sh (adoptium#1060)

* Allow Debian8 as an option to vmDestroy.sh (adoptium#1064)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* PbTests: Updated READMEs relevant to the Test Scripts (adoptium#993)

* Redraft and update ansible README.md (Phase 1!) (adoptium#1063)

* PbTests: Updated READMEs relevant to the Test Scripts

* Refactor and update ansible README.md

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

Co-authored-by: William Parker <52783864+Willsparker@users.noreply.github.com>

* Made Deb8 VF find IP correctly (adoptium#1065)

* Made Deb8 VF find IP correctly

* Change Deb8 box

* ansible: Add adoptopenjdk8 repository to Debian (adoptium#1068)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* pbTestScripts: Add Debian8 reference and link to VagrantPlaybookCheck job (adoptium#1069)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* UnixPB: Update playbook to allow SLES12 to work (adoptium#1062)

* VFs: Add FreeBSD12 and SLES12 Vagrantfiles (adoptium#1073)

* VFs: Add FreeBSD12 VF

* pbTest: Update vmDestroy.sh to include FBSD12

* VFs: Add SLES12 VF & Add to vmDestroy.sh

* Use vagrantfiles from main repo by default, option to take from the alternate branch (adoptium#1070)

* Don't use vagrant files from the branch under test

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* pbTestScripts: Add option to use Vagrant files from the new branch

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* Fixup last commit which had wrong main Vagrantfile path (adoptium#1076)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* UnixPB: Remove 'group' tag from adoptopenjdk_install role (adoptium#1078)

* UnixPB: Make changes so FreeBSD works (adoptium#1077)

* pbTest: Run extended.system tests on Windows (adoptium#1079)

* Update Marist zlinux inventory to the new z15 linux machines (adoptium#1041)

* Add AIX71SP5TL5 machine for AIX JDK13+ builds

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* inventory: Replace Marist machines with new z15 versions

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* pbTests: Fix 'checkVagrantOS' error message (adoptium#1080)

* ansible: Switch adoptopenjdk downloads to APIv3 from APIv2 (adoptium#1074)

* pbTests: add optional extra skip tags to speed up testing (adoptium#1082)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* pbTests: ensure in correct directory to vagrant halt (adoptium#1089)

* Add initial openjdk-infrastructure FAQ (adoptium#1066)

* Add initial openjdk-infrastructure FAQ.md

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* typo fix

* jenkins_user tag, instead of jenkins

The Jenkins roles in the Unix playbook are tagged with "jenkins_user", not "jenkins" (if it's these roles you were going for)

Co-authored-by: George Adams <george.adams@microsoft.com>
Co-authored-by: Haroon Khel <34969545+Haroon-Khel@users.noreply.github.com>

* UnixPB: Fixes for FreeBSD12 (adoptium#1083)

* UnixPB: Set vars for if undefined and remove unneeded tasks (adoptium#1092)

* unixPB: Enable protobuf for OpenJ9 JITserver (adoptium#1094)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* pbTests: Update buildJDK.sh to support FreeBSD & openSUSE (adoptium#1095)

* pbTests: Update buildJDK.sh to support FreeBSD

* pbTest: Set JAVA_HOME for FreeBSD

* pbTests: Allow for openSUSE to be built

* pbTests: Update testJDK.sh for FreeBSD

* add build-macstadium-macos1014-1 (adoptium#1107)

* Set Java 8 as Default in Alternatives for CentOS 6

Signed-off-by: Rajdeep Singh <rajdeep.singh@ibm.com>

* Upgrade protobuf to v3.7.1 (adoptium#1112)

Upgrade protobuf version from 3.5.1 to 3.7.1 and update the download
link accordingly.

Signed-off-by: Violeta Sebe <vsebe@ca.ibm.com>

* inventory: Add new AIX systems (adoptium#1109)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* Added build tags to appropriate roles (adoptium#1100)

* Added build tags to appropriate roles

* change hosts back from all

* test prereq packages for centos added

* added libcurl-devel packages

* Remove trailing spaces

* UnixPB: Add support for OpenSUSE12.3 (adoptium#1101)

* unixPB: Add support for OpenSUSE12.3

* pbTests: add SUSE12 to vmDestroy and remove SLES12 VF

* unixPB: Enable protobuf for OpenJ9 JITserver (adoptium#1094)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* pbTests: Update buildJDK.sh to support FreeBSD & openSUSE (adoptium#1095)

* pbTests: Update buildJDK.sh to support FreeBSD

* pbTest: Set JAVA_HOME for FreeBSD

* pbTests: Allow for openSUSE to be built

* pbTests: Update testJDK.sh for FreeBSD

Co-authored-by: Stewart X Addison <sxa555@users.noreply.github.com>

* unixPB: Passed CC/CXX to Protobuf build task (adoptium#1114)

* winPB: Update checksums for win_get_url module (adoptium#1113)

* winPB: Put checksum into correct format for win_get_url

* winPB: Correct failing checksums

* winPB: Changed Freemarker URL

* Remove zulu-9 from Additional_Build_Tools var lists (adoptium#1116)

* Remove zulu-9 from Additional_Build_Tools var lists

* Remove tasks for adding zulu.repo

* remove azul repo (adoptium#1117)

* Set ansible_processor_vcpus for cmake role (adoptium#1110)

Ensure ansible_processor_vcpus variable is inherited by cmake role when
running tag only.

Signed-off-by: Violeta Sebe <vsebe@ca.ibm.com>

* vagrant: Temporarily use alternate openjdk-build branch (adoptium#1122)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* pbTests: update testJDK.sh to not use run_configure.mk (adoptium#1123)

* pbTests: Fixup last commit (adoptium#1126)

* inventory: Add first 2 AWS Win2019 systems (adoptium#1130)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* updates to support RHEL 8 playbooks (adoptium#1129)

* unixPB: Remove duplicate protobuf install (adoptium#1102)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* remove p7zip dependency on macOS (adoptium#1137)

* More aix machines woohoo (adoptium#1115)

* inventory: Add new AIX systems

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* inventory: Add AIX machines correctly

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

*  UnixPB: Remove CPAN role (adoptium#1136)

*  UnixPB: Remove CPAN role

* Removed additional seperate packages

* VFs: Ref adoptium#685 non-zero exit status fix (adoptium#1144)

* UnixPB: Add support for SLES15-SP0 (adoptium#1140)

* UnixPB: Add support for SLES15-SP0

* Remove ntp and enable chronyd for SLES15

* winPB: Passed the value of hosts from command line (adoptium#1075)

* apply change to windows playbook as performed in adoptium#1017
* adoptium#423

Signed-off-by: Joe deKoning <joe_dekoning@ca.ibm.com>

* UnixPB: remove sudo from GIT_SOURCE role (adoptium#1147)

* ansible: Remove old gcc 7 locations for Protobuf role

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* UnixPB: Add support for CentOS8 (adoptium#1131)

* UnixPB: Add support for CentOS8

* Add CentOS8 as vmDestroy option

* win: Adjust cygwin setup checksum as it's been updated (adoptium#1149)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* pbTests: Change buildJDK to build from other URLs (adoptium#1152)

* pbTests: Change buildJDK to be able to build JDKs 8-14

* Add various options to buildJDK.sh

* Make build openj9 by default

* pbTests: Add script to test U18 on s390x/ppc64le QEMU VMs (adoptium#1119)

* pbTests: Initial commit of qemu_test_script

* Add 'fastmode' to qemu script

* PB: Add qemu to vagrant.yml

* Make ppc64le machine as pseries-2.12

* Correct expect path; Add expect to vagrant.yml

* Remove use of expect_script

* Build Qemu 4.2; Add arguments to 'ps'

* Ensure script stops if playbook fails

* Add multi-core support to the qemu VMs

* Fix syntax error

* Update port detection logic to use netstat

* Increase RAM on  qemu systems as 1Gb is mean for SMP4

* Use xz compressed base images from /qemu_base_images

* alter testJDK to accept other architectures

* changes to allow for U18 s390x to work

* Change infra repo to run playbook from

* Add back in checksum

Co-authored-by: Stewart X Addison <sxa555@users.noreply.github.com>

* pbTests: Change URLs to run the playbook from (adoptium#1156)

* UnixPB: Remove pulseaudio from Common/vars/SLES.yml (adoptium#1157)

* playbook: Update gcc-7 role to install gcc 7.5 (adoptium#1158)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* Ram increase for Vagrant VMs (adoptium#1081)

* Vagrant: 4GB of RAM, 50% CPU cap

* Vagrant: Adjust RAM down to 2.5Gb

* winPB: Change checksum for MSVS_2017 (adoptium#1162)

* unixPB: Remove repeat in SLES package list (adoptium#1161)

* unixPB: Remove checksum for gcc_7 task (adoptium#1160)

* winPB: Switch adoptopenjdk download to use APIv3 (adoptium#1167)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* unixPB: Remove devtoolset-7 and require Adopt's GCC7.5 (adoptium#1166)

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

* unixPB: Alter adoptopenjdk_install role to allow for jdk8 (adoptium#1138)

* unixPB: Alter adoptopenjdk_install to let jdk8

* Alter adoptopenjdk_install to exclude macOS

* pbTests: Added option to specify openjdk-build repo (adoptium#1170)

* add dockerfiles for aws codebuild

Co-authored-by: Pav Salimon <32314784+olvap377@users.noreply.github.com>
Co-authored-by: Joe deKoning <joe_dekoning@ca.ibm.com>
Co-authored-by: William Parker <52783864+Willsparker@users.noreply.github.com>
Co-authored-by: Jenny Chen <41126207+JennyChenyj@users.noreply.github.com>
Co-authored-by: Stewart X Addison <sxa555@users.noreply.github.com>
Co-authored-by: Haroon Khel <34969545+Haroon-Khel@users.noreply.github.com>
Co-authored-by: Rajdeep Singh <56080803+rajdeepsingh1@users.noreply.github.com>
Co-authored-by: vsebe <vsebe@ca.ibm.com>
Co-authored-by: Sej <41746002+sej-jackson@users.noreply.github.com>
  • Loading branch information
10 people authored Feb 26, 2020
1 parent 6871b17 commit fdf0cf3
Show file tree
Hide file tree
Showing 92 changed files with 2,132 additions and 786 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build

on:
pull_request:
paths:
- ansible/**
branches:
- master
push:
paths:
- ansible/**
branches:
- master

env:
AWS_DEFAULT_REGION: eu-west-1
AWS_DEFAULT_OUTPUT: json
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CONTAINER_IMAGE: adoptopenjdk/centos6_image
SLAVE_IMAGE: adoptopenjdk/jenkins_slave

jobs:
build-and-push:
name: Building and pushing image to AWS ECR
runs-on: ubuntu-latest
steps:

- name: Login to ECR
if: github.ref == 'refs/heads/master'
run: |
$( aws ecr get-login --no-include-email )
- name: Build and tag Centos6 Image
run: |
docker build \
-t $CONTAINER_IMAGE \
-t $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE ./ansible/Dockerfile.Centos6
- name: Push Centos6 Image
if: github.ref == 'refs/heads/master'
run: |
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE
- name: Build and tag Jenkins Slave Image
if: github.ref == 'refs/heads/master'
run: |
docker build \
-t $SLAVE_IMAGE \
-t $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$SLAVE_IMAGE ./ansible/Dockerfile.JenkinsSlave
- name: Push Slave Image
if: github.ref == 'refs/heads/master'
run: |
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$SLAVE_IMAGE
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ script:
- cd ansible

# Check that the inventory is valid
- ansible-inventory --host=build-marist-rhel74-s390x-1
- ansible-inventory --host=build-marist-rhel77-s390x-1

# Check YAML validity
- yamllint -c yamllint.yml .
Expand Down
147 changes: 147 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# openjdk-infrastructure guide to frequent modifications and usage

## Access control in the repository

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

- [adoptopenjdk-infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/adoptopenjdk-infrastructure) - write access to the repository which lets you be an official approver of PRs (triage doesn't)
- [infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/infrastructure) - higher level of access for system administrators only
- [admin_infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/admin_infrastructure) - The Admin team - can force through changes without approval etc.

## Commit messages

Wherever possible, prefix the commit message with the area which you are
changing e.g.

- unixPB:
- winPB:
- aixPB:
- ansible:
- vagrant:
- pbTests:
- docs:
- plugins:
- inventory:

## Change approvals

All changes to the repository should be made via GitHub pull requests.

Reviews are required for PRs in this repository. In very special
circumstances such as a clear breakage that has a simple fix available
then a repository admin may override that requirement to push through
a change if no reviewers are available, but in such cases a comment
explaining why must be added to the Pull Request.

## Running the ansible scripts on your local machine

The full documentation for running locally is at [ansible/README.md] but
assuming you have ansible installed on your UNIX-based machine, clone this
repository, create an `inventory` text file with the word `localhost`
and run this from the `ansible` directory:

```
ansible-playbook -i inventory_file --skip-tags adoptopenjdk,jenkins_user playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
```

NOTE: For windows machines you cannot use this method as ansible does not
run natively on Windows

## Running the ansible scripts remotely on another machine

Create an inventory file with the list of machines you want to set up, then
from the `ansible` directory in this repository run somethig like this:

`ansible-playbook -i inventory_file --skip-tags=adoptopenjdk,jenkins playbooks/AdoptOpenJDK_Unix_Playbook/main.yml --skip-tags=adoptopenjdk,jenkins`

If you don't have ssh logins enabled as root, add `-b -u myusername` to the
command line which will ssh into the target machine as `myusername` and use
`sudo` to gain root access to do the work.

To do this you ideally need to be using key-based ssh logins. If you use a
passphrase on your ssh key use the following to hold the credentials in the
shell:

```
eval `` `ssh-agent` ``
ssh-add
```

and if using the `-b` option, ensure that your user has access to `sudo`
without a password to
the `root` account (often done by adding it to the `wheel` group)

## Adding a new role to the ansible scripts

Other than the dependencies on the machines which come from packages shipped
with the operating system, we generally use individual roles for each piece
of software which we install on the machines. For the main Unix and Windows
playbooks each rol has it's own directory and is called from the top level
`main.yml` playbook. They are fairly easy to add and in most cases you can
look at an existing one and copy it.

As far as possibly, give each operation within the role a tags so that it
can either be skipped if someone doesn't want it, or run on its own if
desired.

If something is specific to the adoptopenjdk infrastructure (e.g. setting
hostnames, or configuring things specific to our setup but aren't required
to be able to run build/test operations) then give the enitries in that role
an `adoptopenjdk` tag as well. If you need to do something potentially
adjusting the users' system, use the `dont_remove_system` tag. This is
occasionally required if, for example, we need a specific version of a tool
on the machine that is later than the default, and want to ensure that the
old version does not get invoked by default on the adoptopenjdk machines.
See
[GIT_Source](https://github.com/AdoptOpenJDK/openjdk-infrastructure/blob/master/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/GIT_Source/tasks/main.yml)
as an example

## Testing changes

If you are making a change which might have a negative effect on the
playbooks on other platforms, be sure to run it through the
[VagrantPlaybookCheck](https://ci.adoptopenjdk.net/view/work%20in%20progress/job/VagrantPlaybookCheck/)
job first. This job takes a branch from a fork of the
`openjdk-infrastructure` repository as a parameter and runs the playbooks
against a variety of Operating Systems using Vagrant and the scripts in
[pbTestScripts](https://github.com/AdoptOpenJDK/openjdk-infrastructure/tree/master/ansible/pbTestScripts)
to validate them.

## Jenkins access

The AdoptOpenJDK Jenkins server at https://ci.adoptopenjdk.net is used for all the
builds and testing automation. Since we're as open as possible, general read
access is enabled. For others, access is controlled via github teams (via
the Jenkins `Github Authentication Plugin` as follows. (Links here won't work for
most people as the teams are restricted access)

- [release](https://github.com/orgs/AdoptOpenJDK/teams/jenkins-admins/members) can run and configure jobs and views
- [build](https://github.com/orgs/AdoptOpenJDK/teams/build/members) has the access for `release` plus the ability to create new jobs
- [testing]https://github.com/orgs/AdoptOpenJDK/teams/testing/members has the same access as `build`
- [infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/infrastructure/members) has the same as `build`/`testing` plus can manage agent machines
- [jenkins-admins](https://github.com/orgs/AdoptOpenJDK/teams/jenkins-admins/members) as you might expect has access to Administer anything

Some jobs within jenkins, such as the
[build signing job](https://ci.adoptopenjdk.net/job/build-scripts/job/release/job/sign_build)
and [Release tool job](https://ci.adoptopenjdk.net/job/build-scripts/job/release/job/refactor_openjdk_release_tool)
are restricted further via the `Enable project-based security` section of
the job definition. In the case of those two in particular it's `jenkins-admins` and
`release` teams only who have access to them respectively.

## Adding new systems

To add a new system:

1. Ensure there is an issue documenting its creation somewhere (Can just be an existing issue that you add the hostname too so it can be found later
2. Obtain system from the appropriate infrastructure provider
3. Set it up using the appropriate ansible scripts for its purpose
4. Connect it to jenkins, verify a typical job runs on it if you can and add the tags
5. Add it to the [inventory.yml](https://github.com/AdoptOpenJDK/openjdk-infrastructure/blob/65aa9e2a15b7ebb81858f19e6e4048c16d7e8cd6/ansible/inventory.yml)
file. If you're adding a new type of machine (`build`, `perf` etc.) then you
should also add it to
[adoptopenjdk_taml.py](https://github.com/AdoptOpenJDK/openjdk-infrastructure/blob/master/ansible/plugins/inventory/adoptopenjdk_yaml.py#L45)
and, if it will be configured via the standard playbooks, added to the
list at the top of the main playbook files for
[*IX](https://github.com/AdoptOpenJDK/openjdk-infrastructure/blob/master/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml#L8) and
[windows](https://github.com/AdoptOpenJDK/openjdk-infrastructure/blob/master/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml#L20)
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Core infrastructure team - granted access to hosts on a case by case basis
- [@mwornast](https://github.com/mwornast) - Marcus Wornast (IBM) - *
- [@pnstanton](https://github.com/pnstanton) - Peter Stanton (IBM) - *
- [@sej-jackson](https://github.com/sej-jackson) - Sej Jackson (IBM)
- [@sxa555](https://github.com/sxa555) - Stewart X Addison (IBM) - *
- [@tellison](https://github.com/tellison) - Tim Ellison (IBM) - *
- [@vsebe](https://github.com/vsebe) - Violeta Sebe (IBM)

Expand All @@ -78,11 +79,15 @@ Issues can be assigned to these folks

- [@AdamBrousseau](https://github.com/AdamBrousseau) - Adam Brousseau (IBM)
- [@CJKwork](https://github.com/CJKwork) - Clive Kennedy (IBM)
- [@cwesMills](https://github.com/cwesMills) - Colton Mills (IBM)
- [@cwillhelm](https://github.com/cwillhelm) - Connor Willhelm (IBM)
- [@Haroon-Khel](https://github.com/Haroon-Khel) - Haroon Khel (IBM)
- [@HusainYusafali](https://github.com/HusainYusufali) - Husain Yusufali (IBM)
- [@jdekonin](https://github.com/jdekonin) - Joe deKoning (IBM)
- [@karianna](https://github.com/karianna) - Martijn Verburg (Microsoft / LJC)
- [@sej-jackson](https://github.com/sej-jackson) - Sej Jackson (IBM)
- [@vsebe](https://github.com/vsebe) - Violeta Sebe (IBM)
- [@Willsparker](https://github.com/Willsparker) - William Parker (IBM)

## [@jenkins-admins](https://github.com/orgs/AdoptOpenJDK/teams/jenkins-admins)
- [@ali-ince](https://github.com/ali-ince) Ali Ince (LJC)
Expand Down
22 changes: 22 additions & 0 deletions ansible/Dockerfile.CentOS6
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM centos:6.9

ARG user=jenkins

RUN yum -y update; yum clean all
RUN rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm; \
yum -y install ansible sudo; yum clean all

COPY . /ansible

RUN echo "localhost ansible_connection=local" > /ansible/hosts

RUN set -eux; \
cd /ansible; \
ansible-playbook -i hosts -s playbooks/AdoptOpenJDK_Unix_Playbook/main.yml --skip-tags="debug,hosts_file,hostname,adoptopenjdk,jenkins,nagios,superuser,docker,swap_file,crontab,adoptopenjdk_install"

RUN groupadd -g 1000 ${user}
RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user}

# OpenJDK 9+ gets auto installed in the build scripts
ENV JDK7_BOOT_DIR="/usr/lib/jvm/java-1.7.0-openjdk.x86_64"
ENV JDK8_BOOT_DIR="/usr/lib/jvm/java-1.8.0-openjdk.x86_64"
24 changes: 24 additions & 0 deletions ansible/Dockerfile.JenkinsSlave
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM adoptopenjdk/centos6_image

ARG VERSION=4.0.1
ARG user=jenkins
ARG AGENT_WORKDIR=/home/${user}/agent

RUN curl --create-dirs -fsSLo /usr/share/jenkins/agent.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar \
&& chmod 755 /usr/share/jenkins \
&& chmod 644 /usr/share/jenkins/agent.jar \
&& ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar

RUN curl --create-dirs -fsLo /usr/local/bin/jenkins-agent https://raw.githubusercontent.com/jenkinsci/docker-jnlp-slave/master/jenkins-agent \
&& chmod +x /usr/local/bin/jenkins-agent \
&& ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave

USER ${user}
ENV AGENT_WORKDIR=${AGENT_WORKDIR}
RUN mkdir /home/${user}/.jenkins && mkdir -p ${AGENT_WORKDIR}

VOLUME /home/${user}/.jenkins
VOLUME ${AGENT_WORKDIR}
WORKDIR /home/${user}

ENTRYPOINT ["jenkins-agent"]
Loading

0 comments on commit fdf0cf3

Please sign in to comment.