Skip to content

Commit

Permalink
fix(build): fix vagrant issue related to WinRM
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap committed Nov 17, 2023
1 parent 201a258 commit 9eb730d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ on:
ANSIBLE_DEBUG:
type: choice
description: ANSIBLE_DEBUG (true, false)
default: "false"
options:
- "false"
- "true"
Expand All @@ -54,7 +53,6 @@ on:
build_upload:
type: choice
description: Upload release to Vagrant Cloud
default: "false"
options:
- "false"
- "true"
Expand Down Expand Up @@ -196,26 +194,34 @@ jobs:
- name: Install packages
run: |
set -euxo pipefail
# Remove unused packages to save some disk space
rm -rf /Users/runner/Library/Developer /Users/runner/Library/Android /Users/runner/hostedtoolcache /Users/runner/.dotnet
brew update
brew install bash coreutils gnu-sed jq packer hudochenkov/sshpass/sshpass vagrant
brew install ansible bash coreutils gnu-sed jq packer hudochenkov/sshpass/sshpass hashicorp/tap/hashicorp-vagrant
if [[ "${PACKER_VAGRANT_PROVIDER}" = "libvirt" ]]; then
brew install qemu xorriso
qemu-system-x86_64 --version
fi
if [[ "${PACKER_VAGRANT_PROVIDER}" = "virtualbox" ]]; then
brew install virtualbox
vboxmanage --version
fi
# renovate: datasource=pypi depName=ansible
ANSIBLE_VERSION="8.2.0"
pip3 install ansible=="${ANSIBLE_VERSION}"
vagrant --version
packer --version
ansible --version
if [[ "${BUILD}" =~ windows ]]; then
# renovate: datasource=pypi depName=pywinrm
PYWINRM_VERSION="0.4.3"
pip3 install pywinrm=="${PYWINRM_VERSION}"
ansible-galaxy collection install -v -r ansible/requirements.yml
ansible-galaxy collection install --force -r ansible/requirements.yml
fi
echo "/usr/local/bin:/usr/local/opt/gnu-sed/libexec/gnubin:/usr/local/opt/coreutils/libexec/gnubin" >> "${GITHUB_PATH}"
# Used by mxschmitt/action-tmate
touch continue
Expand All @@ -235,7 +241,7 @@ jobs:
with:
name: ${{ matrix.stage }}
path: ${{ env.LOGDIR }}/*
retention-days: 1
retention-days: 3

- name: Check the created box image
run: |
Expand Down
2 changes: 2 additions & 0 deletions vagrant_init_destroy_boxes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ main() {
fi
test -d "${LOGDIR}" || mkdir -p "${LOGDIR}"

set -x

for VAGRANT_BOX_FILE in ${BOXES_LIST}; do
VAGRANT_BOX_NAME=$(basename "${VAGRANT_BOX_FILE%.*}")
export VAGRANT_BOX_NAME
Expand Down

0 comments on commit 9eb730d

Please sign in to comment.