Skip to content

Commit

Permalink
Fixed builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydrogers committed Oct 5, 2024
1 parent 12397a2 commit 7c7ae97
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
17 changes: 0 additions & 17 deletions ansible-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,29 +90,12 @@ operating_system_distributions:
- "libssl-dev"
- "openssh-client"
- "sshpass"
- name: "bookworm"
package_dependencies:
- "git"
- "libffi-dev"
- "libssl-dev"
- "openssh-client"
- "sshpass"

- name: "alpine"
versions:
- name: "alpine3.20"
latest_stable: true
package_dependencies:
- "build-base"
- "git"
- "libffi-dev"
- "openssh-client"
- "openssl-dev"
- "rsync"
- "sshpass"
- name: "alpine3.19"
package_dependencies:
- "build-base"
- "git"
- "libffi-dev"
- "openssh-client"
Expand Down
7 changes: 5 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,10 @@ build_docker_image() {
local package_dependencies=$(get_package_dependencies "$os_family")

# Get the full patch version and save it to GITHUB_ENV
local full_ansible_version=$(lookup_and_save_ansible_version "$ANSIBLE_VARIATION" "$ANSIBLE_VERSION")
local full_ansible_version=$(lookup_and_save_ansible_version "$ANSIBLE_VARIATION" "$ANSIBLE_VERSION" | tail -n1)

# Remove any ANSI color codes from the version string
full_ansible_version=$(echo "$full_ansible_version" | sed 's/\x1b\[[0-9;]*m//g')

build_args=(
--build-arg ANSIBLE_VARIATION="$ANSIBLE_VARIATION"
Expand Down Expand Up @@ -336,7 +339,7 @@ build_docker_image() {

# Construct the Docker command as an array
docker_command=(
docker --debug buildx build
docker buildx build
"${DOCKER_ADDITIONAL_BUILD_ARGS[@]}"
"${build_args[@]}"
--file "src/Dockerfile"
Expand Down
5 changes: 4 additions & 1 deletion src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ RUN /usr/bin/local/serversideup-dep-install-alpine ${PACKAGE_DEPENDENCIES} && \
/usr/bin/local/serversideup-dep-install-debian ${PACKAGE_DEPENDENCIES}

# Install Ansible
RUN pip3 install ${ANSIBLE_VARIATION}==${ANSIBLE_VERSION}
RUN set -ex && \
echo "🤓 Installing ${ANSIBLE_VARIATION}==${ANSIBLE_VERSION}" && \
pip3 install --no-cache-dir ${ANSIBLE_VARIATION}==${ANSIBLE_VERSION} && \
ansible --version

CMD ["ansible-playbook", "--version"]

0 comments on commit 7c7ae97

Please sign in to comment.