airshipctl/roles/airshipctl-systemwide-execu.../tasks/main.yaml

34 lines
1.3 KiB
YAML

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: "make docker-image"
make:
chdir: "{{ remote_work_dir + '/airshipctl' if remote_work_dir is defined else zuul.project.src_dir }}"
target: docker-image
params:
USE_PROXY: "{{ proxy.enabled }}"
PROXY: "{{ proxy.http }}"
NO_PROXY: "{{ proxy.noproxy }}"
- name: "copy airshipctl binary to host"
shell: |
set -ex
DOCKER_IMAGE_TAG=$(make print-docker-image-tag)
CONTAINER=$(docker create "${DOCKER_IMAGE_TAG}")
sudo docker cp "${CONTAINER}:/usr/local/bin/airshipctl" "/usr/local/bin/airshipctl"
docker rm "${CONTAINER}"
args:
chdir: "{{ remote_work_dir + '/airshipctl' if remote_work_dir is defined else zuul.project.src_dir }}"
- name: "make sure airshipctl is executable"
command: airshipctl version