collection 교체

This commit is contained in:
정훈 변
2024-02-23 16:37:40 +09:00
parent b494779b5b
commit 3fd554eee9
38862 changed files with 220204 additions and 6600073 deletions

View File

@@ -1,4 +1,8 @@
shippable/posix/group1
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
azp/posix/1
destructive
skip/aix
skip/freebsd

View File

@@ -1,3 +1,8 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
dependencies:
- setup_pkg_mgr
- setup_gnutar

View File

@@ -1,29 +1,17 @@
---
####################################################################
# WARNING: These are designed specifically for Ansible tests #
# and should not be used as examples of how to write Ansible roles #
####################################################################
# Yarn package manager integration tests
# (c) 2018 David Gunter, <david.gunter@tivix.com>
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright (c) 2018 David Gunter, <david.gunter@tivix.com>
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# ============================================================
- include: run.yml
- include_tasks: run.yml
vars:
nodejs_version: '{{ item.node_version }}'
nodejs_path: 'node-v{{ nodejs_version }}-{{ ansible_system|lower }}-x{{ ansible_userspace_bits }}'

View File

@@ -1,3 +1,8 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: 'Create directory for Node'
file:
path: /usr/local/lib/nodejs
@@ -7,14 +12,14 @@
unarchive:
src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/yarn/{{ nodejs_path }}.tar.gz'
dest: '{{ remote_tmp_dir }}'
remote_src: yes
remote_src: true
creates: '{{ remote_tmp_dir }}/{{ nodejs_path }}.tar.gz'
- name: 'Download Yarn'
unarchive:
src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/yarn/yarn-v{{yarn_version}}.tar.gz'
dest: '{{ remote_tmp_dir }}'
remote_src: yes
remote_src: true
creates: '{{ remote_tmp_dir }}/yarn-v{{yarn_version}}_pkg.tar.gz'
- name: 'Copy node to directory created earlier'
@@ -34,6 +39,7 @@
package: 'iconv-lite'
environment:
PATH: "{{ node_bin_path }}:{{ansible_env.PATH}}"
YARN_IGNORE_ENGINES: true
block:
# Get the version of Yarn and register to a variable
@@ -43,8 +49,8 @@
register: yarn_version
- name: 'Create dummy package.json'
copy:
src: templates/package.j2
template:
src: package.j2
dest: '{{ remote_tmp_dir }}/package.json'
- name: 'Install all packages.'
@@ -102,6 +108,15 @@
that:
- yarn_install_old_package is changed
- name: 'Again but without explicit executable path'
yarn:
path: '{{ remote_tmp_dir }}'
name: left-pad
version: 1.1.0
state: present
environment:
PATH: '{{ yarn_bin_path }}:{{ node_bin_path }}:{{ ansible_env.PATH }}'
- name: 'Upgrade old package'
yarn:
path: '{{ remote_tmp_dir }}'
@@ -130,3 +145,89 @@
assert:
that:
- yarn_uninstall_package is changed
- name: 'Global install binary with explicit version (older version of package)'
yarn:
global: true
executable: '{{ yarn_bin_path }}/yarn'
name: prettier
version: 2.0.0
state: present
environment:
PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}'
register: yarn_global_install_old_binary
- assert:
that:
- yarn_global_install_old_binary is changed
- name: 'Global upgrade old binary'
yarn:
global: true
executable: '{{ yarn_bin_path }}/yarn'
name: prettier
state: latest
environment:
PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}'
register: yarn_global_update_old_binary
- assert:
that:
- yarn_global_update_old_binary is changed
- name: 'Global remove a binary'
yarn:
global: true
executable: '{{ yarn_bin_path }}/yarn'
name: prettier
state: absent
environment:
PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}'
register: yarn_global_uninstall_binary
- assert:
that:
- yarn_global_uninstall_binary is changed
- name: 'Global install package with no binary with explicit version (older version of package)'
yarn:
global: true
executable: '{{ yarn_bin_path }}/yarn'
name: left-pad
version: 1.1.0
state: present
environment:
PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}'
register: yarn_global_install_old_package
- assert:
that:
- yarn_global_install_old_package is changed
- name: 'Global upgrade old package with no binary'
yarn:
global: true
executable: '{{ yarn_bin_path }}/yarn'
name: left-pad
state: latest
environment:
PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}'
register: yarn_global_update_old_package
- assert:
that:
- yarn_global_update_old_package is changed
- name: 'Global remove a package with no binary'
yarn:
global: true
executable: '{{ yarn_bin_path }}/yarn'
name: left-pad
state: absent
environment:
PATH: '{{ node_bin_path }}:{{ ansible_env.PATH }}'
register: yarn_global_uninstall_package
- assert:
that:
- yarn_global_uninstall_package is changed

View File

@@ -1,3 +1,8 @@
{#
Copyright (c) Ansible Project
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
SPDX-License-Identifier: GPL-3.0-or-later
#}
{
"name": "ansible-yarn-testing",
"version": "1.0.0",
@@ -6,4 +11,4 @@
"iconv-lite": "^0.4.21",
"@types/node": "^12.0.0"
}
}
}