1#*************************************************************************** 2# _ _ ____ _ 3# Project ___| | | | _ \| | 4# / __| | | | |_) | | 5# | (__| |_| | _ <| |___ 6# \___|\___/|_| \_\_____| 7# 8# Copyright (C) 2021, Daniel Stenberg, <daniel@haxx.se>, et al. 9# 10# This software is licensed as described in the file COPYING, which 11# you should have received as part of this distribution. The terms 12# are also available at https://curl.se/docs/copyright.html. 13# 14# You may opt to use, copy, modify, merge, publish, distribute and/or sell 15# copies of the Software, and permit persons to whom the Software is 16# furnished to do so, under the terms of the COPYING file. 17# 18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19# KIND, either express or implied. 20# 21########################################################################### 22--- 23- hosts: all 24 tasks: 25 26 - name: Install latest stable release of go 27 when: gimme_stable|default(false) 28 block: 29 - name: Find latest stable version 30 register: go_stable 31 uri: 32 url: https://golang.org/VERSION?m=text 33 return_content: true 34 - name: Install Go 35 include_role: 36 name: ensure-go 37 vars: 38 go_version: "{{ go_stable.content | regex_replace('^go', '') }}" 39 40 - name: Symlink /usr/local/go/bin/go to /usr/bin/go 41 become: true 42 file: 43 src: /usr/local/go/bin/go 44 dest: /usr/bin/go 45 state: link 46 47 - name: Install common dependencies 48 become: true 49 apt: 50 update_cache: true 51 pkg: 52 - autoconf 53 - automake 54 - cmake 55 - valgrind 56 - libev-dev 57 - libc-ares-dev 58 - libssl-dev 59 - libtool 60 - g++ 61 - g++-8 62 - stunnel4 63 - libidn2-dev 64 - gnutls-bin 65 - python-impacket 66 - ninja-build 67 - libgsasl7-dev 68 - libnghttp2-dev 69 70 - name: Install job-specific packages 71 when: curl_apt_packages is defined 72 become: true 73 apt: 74 pkg: "{{ curl_apt_packages }}" 75 76 - name: Symlink /usr/bin/scan-build-10 to /usr/bin/scan-build 77 when: 78 - curl_apt_packages is defined 79 - '"clang-tools-10" in curl_apt_packages' 80 become: true 81 file: 82 src: /usr/bin/scan-build-10 83 dest: /usr/bin/scan-build 84 state: link 85 86 - name: Run before script 87 shell: "./scripts/zuul/before_script.sh" 88 args: 89 chdir: "{{ zuul.project.src_dir }}" 90 environment: "{{ curl_env }}" 91... 92