Path: blob/master/buildenv/ansible/roles/openj9-image/tasks/main.yml
13397 views
###############################################################################1# Copyright (c) 2018, 2018 Pavel Samolysov2#3# This program and the accompanying materials are made available under4# the terms of the Eclipse Public License 2.0 which accompanies this5# distribution and is available at https://www.eclipse.org/legal/epl-2.0/6# or the Apache License, Version 2.0 which accompanies this distribution and7# is available at https://www.apache.org/licenses/LICENSE-2.0.8#9# This Source Code may also be made available under the following10# Secondary Licenses when the conditions for such availability set11# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12# General Public License, version 2 with the GNU Classpath13# Exception [1] and GNU General Public License, version 2 with the14# OpenJDK Assembly Exception [2].15#16# [1] https://www.gnu.org/software/classpath/license.html17# [2] http://openjdk.java.net/legal/assembly-exception.html18#19# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20###############################################################################21---22- set_fact:23timestamp: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}"24tags:25- image26- name: Create a target image build folder27file:28dest: "{{ host_dir }}"29mode: 075530state: directory31tags:32- image33- name: Get Dockerfile for the target image34copy:35src: Dockerfile-ubuntu36dest: "{{ host_dir }}/Dockerfile"37mode: 064438tags:39- image40- name: Build the target docker image41docker_image:42path: "{{ build_dir }}/image"43dockerfile: Dockerfile44name: "{{ target.namespace }}/openj9-{{ version }}"45tag: "{{ os }}-{{ platform }}-{{ timestamp }}"46rm: yes47push: "{{ target.push }}"48buildargs:49JAVA_HOME: "{{ target.javahome }}"50GROUP: "{{ target.group }}"51GROUPID: "{{ target.groupid }}"52USER: "{{ target.user }}"53USERID: "{{ target.userid }}"54OS: "{{ os }}"55VERSION: "{{ version }}"56PLATFORM: "{{ platform }}"57tags:58- image596061