Skip to content

Commit

Permalink
ansible: add alpine build image
Browse files Browse the repository at this point in the history
  • Loading branch information
gdams committed Aug 9, 2020
1 parent 84f0cd5 commit 531572d
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,21 @@ jobs:
dockerfile: ./ansible/Dockerfile.CentOS6
repository: adoptopenjdk/centos6_build_image
tags: latest
push: ${{ github.ref == 'refs/heads/master' }}

build-and-push-alpine3:
name: Alpine3
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2

- name: Docker Build & Push Alpine3 Image to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: ./ansible/Dockerfile.Alpine3
repository: adoptopenjdk/alpine3_build_image
tags: latest
push: ${{ github.ref == 'refs/heads/master' }}
21 changes: 21 additions & 0 deletions ansible/Dockerfile.Alpine3
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM alpine:3

RUN apk update; apk add ansible

COPY . /ansible

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

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

# ENV \
# JDK8_BOOT_DIR="/usr/lib/jvm/java-1.8.0-openjdk.x86_64" \
# JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \
# JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \
# JDK13_BOOT_DIR="/usr/lib/jvm/jdk-13" \
# JDK14_BOOT_DIR="/usr/lib/jvm/jdk-14" \
# JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-14" \
# JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk.x86_64"
5 changes: 5 additions & 0 deletions ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,23 @@
- zulu7 # JDK8 Build Bootstrap
- role: adoptopenjdk_install
jdk_version: 8
when: ansible_distribution != "Alpine"
tags: build_tools
- role: adoptopenjdk_install # JDK11 Build Bootstrap
jdk_version: 10
when: ansible_distribution != "Alpine"
tags: build_tools
- role: adoptopenjdk_install
jdk_version: 11
when: ansible_distribution != "Alpine"
tags: build_tools
- role: adoptopenjdk_install # JDK14 Build Bootstrap
jdk_version: 13
when: ansible_distribution != "Alpine"
tags: build_tools
- role: adoptopenjdk_install # JDK15 Build Bootstrap
jdk_version: 14
when: ansible_distribution != "Alpine"
tags: build_tools
- OpenSSL102 # OpenJ9
# - Nagios_Plugins # AdoptOpenJDK Infrastructure
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
##########
# Alpine #
##########

############################
# Build Packages and tools #
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
##########
# Alpine #
##########

# Command Build Tool Packages
Build_Tool_Packages:
- alpine-sdk
- alsa-lib
- alsa-lib-dev
- autoconf
- bash
- bison # OpenJ9
- cups-dev
- cups-libs
- flex # OpenJ9
- fontconfig
- fontconfig-dev
- freetype
- freetype-dev
- grep
- libdwarf # OpenJ9
- libdwarf-dev # OpenJ9
- libx11
- libx11-dev
- libxext
- libxext-dev
- libxrandr
- libxrandr-dev
- libxrender
- libxrender-dev
- libxt
- libxt-dev
- libxtst
- libxtst-dev
- linux-headers
- numactl
- numactl-dev # OpenJ9
- unzip
- wget
- which
- xz
- zip

Test_Tool_Packages:
- unzip
- zlib
- zlib-dev
- perl
- perl-dev
- libcurl
- curl-dev
- openssl
- openssl-dev
- mercurial
- xauth
- xorg-server
- xvfb

# crontab_Patching: "/usr/bin/yum -y update"
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
when:
- ansible_distribution != "CentOS" and ansible_distribution != "RedHat"
- ansible_distribution != "FreeBSD"
- ansible_distribution != "Alpine"
tags: ntp_time

- name: Configure NTP server pools
Expand Down

0 comments on commit 531572d

Please sign in to comment.