Skip to content

Commit

Permalink
ansible-7.5.0-core-2.14.5 (#57)
Browse files Browse the repository at this point in the history
ansible-config
ansible-playbook
ansible-galaxy
ansible-lint
  • Loading branch information
hemnstill authored May 15, 2023
1 parent 0d0b48c commit e03fdc0
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
uses: ./.github/workflows/release.yml
with:
workflow: ${{ github.workflow }}
tool_version: '7.1.0'
tool_version: '7.5.0'
prepare_body: |
bsdtar -Oxf ./build-docker/build-docker.tar.gz build-docker.md >> body.md
bsdtar -Oxf ./build-gnu/build-gnu.tar.gz build-gnu.md >> body.md
Expand Down
13 changes: 7 additions & 6 deletions README.md

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions ansible/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
dp0="$(realpath "$(dirname "$0")")"
set -e

alpine_version="3.17.2"
alpine_version="3.18.0"
self_name="ansible-alpine-$alpine_version"
image_name="$self_name:latest"

Expand Down Expand Up @@ -31,9 +31,12 @@ docker image: %s
%s
%s
' "$image_name" \
"$(docker run --rm "$image_name" ansible --version)" \
"$(docker run --rm "$image_name" ansible-lint --version)"
"$(docker run --rm "$image_name" ansible-galaxy --version | head -1)" \
"$(docker run --rm "$image_name" ansible-lint --version | head -1)"
} > build-docker.md

cat build-docker.md
Expand Down
39 changes: 16 additions & 23 deletions ansible/build_gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,17 @@ dp0="$(realpath "$(dirname "$0")")"
set -e

apk update
apk add --no-cache alpine-sdk python3-dev gcompat

{ printf '%s' "-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m
y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu
tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp
m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY
KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc
Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m
1QIDAQAB
-----END PUBLIC KEY-----"
} > "/etc/apk/keys/sgerrand.rsa.pub"

wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-i18n-2.35-r0.apk
apk add --force-overwrite glibc-2.35-r0.apk glibc-bin-2.35-r0.apk glibc-i18n-2.35-r0.apk
/usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8
apk add --no-cache alpine-sdk python3-dev bash

"$dp0/../.tools/install_alpine_glibc.sh"

export LC_ALL=en_US.UTF-8

tool_name="ansible"
tool_version="7.1.0"
tool_core_version="2.14.1"
tool_lint_version="6.13.1"
python_self_name="python-3.11.1"
tool_version="7.5.0"
tool_core_version="2.14.5"
tool_lint_version="6.16.0"
python_self_name="python-3.11.3"
self_name="$tool_name-$tool_version"
release_version_dirpath="$dp0/release/$self_name"
echo "::set-output name=tool_name::$tool_name"
Expand Down Expand Up @@ -75,6 +61,10 @@ cp -f "$dp0/release/ansible-playbook.sh" "$release_version_dirpath/"
cp -f "$dp0/release/__main__ansible-playbook.py" "$release_version_dirpath/"
cp -f "$dp0/release/_ansible-playbook" "$release_version_dirpath/Scripts/bin/ansible-playbook"

cp -f "$dp0/release/ansible-galaxy.sh" "$release_version_dirpath/"
cp -f "$dp0/release/__main__ansible-galaxy.py" "$release_version_dirpath/"
cp -f "$dp0/release/_ansible-galaxy" "$release_version_dirpath/Scripts/bin/ansible-galaxy"

cp -f "$dp0/release/ansible-lint.sh" "$release_version_dirpath/"
cp -f "$dp0/release/__main__ansible-lint.py" "$release_version_dirpath/"

Expand All @@ -93,10 +83,13 @@ cd "$release_version_dirpath"
%s
%s
' "$(./"$tool_name.sh" --version)" \
"$(./"ansible-config.sh" --version | head -1)" \
"$(./"ansible-playbook.sh" --version | head -1)" \
"$(./"ansible-lint.sh" --version)"
"$(./"ansible-galaxy.sh" --version | head -1)" \
"$(./"ansible-lint.sh" --version | head -1)"
} > build-gnu.md

cat build-gnu.md
Expand Down
7 changes: 7 additions & 0 deletions ansible/release/__main__ansible-galaxy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
import re
import sys
from ansible.cli.galaxy import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
3 changes: 3 additions & 0 deletions ansible/release/_ansible-galaxy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
dp0="$(realpath "$(dirname "$0")")"
"$dp0/python3" "$dp0/../../__main__ansible-galaxy.py" "$@"
3 changes: 3 additions & 0 deletions ansible/release/ansible-galaxy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
dp0="$(realpath "$(dirname "$0")")"
"$dp0/Scripts/bin/python3" "$dp0/__main__ansible-galaxy.py" "$@"
14 changes: 9 additions & 5 deletions ansible/test_docker.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
#!/bin/bash

alpine_version="3.17.2"
alpine_version="3.18.0"
self_name="ansible-alpine-$alpine_version"
image_name="$self_name:latest"

docker load --input "../bin/$self_name.tar.gz"

test_version() {
assertEquals "ansible [core 2.13.6]
assertEquals "ansible [core 2.14.5]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.10/site-packages/ansible
ansible python module location = /usr/lib/python3.11/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.10.10 (main, Feb 9 2023, 02:08:14) [GCC 12.2.1 20220924]
python version = 3.11.3 (main, May 10 2023, 12:26:31) [GCC 12.2.1 20220924] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True" "$(docker run --rm $image_name ansible --version)"
}

test_ansible_galaxy_version() {
assertEquals "ansible-galaxy [core 2.14.5]" "$(docker run --rm $image_name ansible-galaxy --version | head -1)"
}

test_ansible_lint_version() {
assertEquals "ansible-lint 6.9.1 using ansible 2.13.6" "$(docker run --rm $image_name ansible-lint --version | head -1)"
assertEquals "ansible-lint 6.16.0 using ansible 2.14.5" "$(docker run --rm $image_name ansible-lint --version | head -1)"
}

# Load and run shUnit2.
Expand Down
37 changes: 14 additions & 23 deletions ansible/test_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,12 @@
is_alpine_os=false && [[ -f "/etc/alpine-release" ]] && is_alpine_os=true
is_ubuntu_os=false && [[ -f "/etc/lsb-release" ]] && is_ubuntu_os=true

../.tools/install_alpine_glibc.sh

if [[ "$is_alpine_os" == true ]]; then
apk update
apk add --no-cache gcompat git

{ printf '%s' "-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m
y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu
tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp
m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY
KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc
Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m
1QIDAQAB
-----END PUBLIC KEY-----"
} > "/etc/apk/keys/sgerrand.rsa.pub"
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-i18n-2.35-r0.apk
apk add --force-overwrite glibc-2.35-r0.apk glibc-bin-2.35-r0.apk glibc-i18n-2.35-r0.apk
/usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8
apk add --no-cache git

export LC_ALL=en_US.UTF-8
fi

Expand All @@ -31,31 +18,35 @@ if [[ "$is_ubuntu_os" == true ]]; then
fi

test_version() {
assertEquals "ansible [core 2.14.1]
assertEquals "ansible [core 2.14.5]
config file = None
configured module search path = ['/github/home/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /__w/StandaloneTools/StandaloneTools/bin/Scripts/lib/python3.11/site-packages/ansible
ansible collection location = /github/home/.ansible/collections:/usr/share/ansible/collections
executable location = /__w/StandaloneTools/StandaloneTools/bin/__main__ansible.py
python version = 3.11.1 (main, Jan 16 2023, 22:40:32) [Clang 15.0.7 ] (/__w/StandaloneTools/StandaloneTools/bin/Scripts/bin/python3)
python version = 3.11.3 (main, May 7 2023, 19:33:53) [Clang 16.0.3 ] (/__w/StandaloneTools/StandaloneTools/bin/Scripts/bin/python3)
jinja version = 3.1.2
libyaml = True" "$(../bin/ansible.sh --version)"
}

test_bin_version() {
assertEquals "ansible [core 2.14.1]" "$(../bin/Scripts/bin/ansible --version | head -1)"
assertEquals "ansible [core 2.14.5]" "$(../bin/Scripts/bin/ansible --version | head -1)"
}

test_ansible_config_version() {
assertEquals "ansible-config [core 2.14.1]" "$(../bin/Scripts/bin/ansible-config --version | head -1)"
assertEquals "ansible-config [core 2.14.5]" "$(../bin/Scripts/bin/ansible-config --version | head -1)"
}

test_ansible_playbook_version() {
assertEquals "ansible-playbook [core 2.14.1]" "$(../bin/Scripts/bin/ansible-playbook --version | head -1)"
assertEquals "ansible-playbook [core 2.14.5]" "$(../bin/Scripts/bin/ansible-playbook --version | head -1)"
}

test_ansible_galaxy_version() {
assertEquals "ansible-galaxy [core 2.14.5]" "$(../bin/ansible-galaxy.sh --version | head -1)"
}

test_ansible_lint_version() {
assertEquals "ansible-lint 6.13.1 using ansible 2.14.1" "$(../bin/ansible-lint.sh --version | head -1)"
assertEquals "ansible-lint 6.16.0 using ansible 2.14.5" "$(../bin/ansible-lint.sh --version | head -1)"
}

# Load and run shUnit2.
Expand Down

0 comments on commit e03fdc0

Please sign in to comment.