Merge pull request #7 from JamesJonesConsulting/develop
Some checks failed
Build podman-dind-like / build-and-push (GITHUB_TOKEN, HOME_NEXUS_DOCKER_PASSWORD, NEXUS_DOCKER_USER, ghcr.io, $NEXUS_PROXY_REGISTRY, GITHUB_DOCKER_USER) (push) Has been cancelled
Build podman-dind-like / build-and-push (HOME_NEXUS_DOCKER_PASSWORD, HOME_NEXUS_DOCKER_PASSWORD, NEXUS_DOCKER_USER, nexus.jamesjonesconsulting.com:5443, $NEXUS_PROXY_REGISTRY, NEXUS_DOCKER_USER) (push) Has been cancelled
Some checks failed
Build podman-dind-like / build-and-push (GITHUB_TOKEN, HOME_NEXUS_DOCKER_PASSWORD, NEXUS_DOCKER_USER, ghcr.io, $NEXUS_PROXY_REGISTRY, GITHUB_DOCKER_USER) (push) Has been cancelled
Build podman-dind-like / build-and-push (HOME_NEXUS_DOCKER_PASSWORD, HOME_NEXUS_DOCKER_PASSWORD, NEXUS_DOCKER_USER, nexus.jamesjonesconsulting.com:5443, $NEXUS_PROXY_REGISTRY, NEXUS_DOCKER_USER) (push) Has been cancelled
Adding some additional tweaks for Ansible execution
This commit is contained in:
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@@ -22,6 +22,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: [ self-hosted, medium, build ]
|
runs-on: [ self-hosted, medium, build ]
|
||||||
|
timeout-minutes: 720
|
||||||
container:
|
container:
|
||||||
image: nexus.jamesjonesconsulting.com:5444/podman/stable:latest
|
image: nexus.jamesjonesconsulting.com:5444/podman/stable:latest
|
||||||
# image: quay.io/podman/stable:latest
|
# image: quay.io/podman/stable:latest
|
||||||
@@ -88,8 +89,12 @@ jobs:
|
|||||||
VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's|/|-|g')
|
VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's|/|-|g')
|
||||||
fi
|
fi
|
||||||
podman build . --file Dockerfile --tag "${{ matrix.registry }}/$IMAGE_NAME:$VERSION" --build-arg ARTIFACTORY=${{ matrix.registry_proxy }}
|
podman build . --file Dockerfile --tag "${{ matrix.registry }}/$IMAGE_NAME:$VERSION" --build-arg ARTIFACTORY=${{ matrix.registry_proxy }}
|
||||||
|
if [[ "$GITHUB_REF" =~ ^refs/pull.* ]]; then
|
||||||
|
echo "Pull requests do not get published. Only for testing"
|
||||||
|
else
|
||||||
podman push "${{ matrix.registry }}/$IMAGE_NAME:$VERSION"
|
podman push "${{ matrix.registry }}/$IMAGE_NAME:$VERSION"
|
||||||
if [[ "$GITHUB_REF" =~ ^refs/tags.* ]]; then
|
if [[ "$GITHUB_REF" =~ ^refs/tags.* ]]; then
|
||||||
podman tag "${{ matrix.registry }}/$IMAGE_NAME:$VERSION" "${{ matrix.registry }}/$IMAGE_NAME:latest"
|
podman tag "${{ matrix.registry }}/$IMAGE_NAME:$VERSION" "${{ matrix.registry }}/$IMAGE_NAME:latest"
|
||||||
podman push "${{ matrix.registry }}/$IMAGE_NAME:latest"
|
podman push "${{ matrix.registry }}/$IMAGE_NAME:latest"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ stages:
|
|||||||
variables:
|
variables:
|
||||||
DOCKER_AUTH_CONFIG: ${HOME_NEXUS_DOCKER_AUTH_CONFIG}
|
DOCKER_AUTH_CONFIG: ${HOME_NEXUS_DOCKER_AUTH_CONFIG}
|
||||||
image: "$HOME_NEXUS_DOCKER_REGISTRY_SHARED/podman/stable:latest"
|
image: "$HOME_NEXUS_DOCKER_REGISTRY_SHARED/podman/stable:latest"
|
||||||
|
timeout: 3h 30m
|
||||||
parallel:
|
parallel:
|
||||||
matrix:
|
matrix:
|
||||||
- REGISTRY_USER: $CI_REGISTRY_USER
|
- REGISTRY_USER: $CI_REGISTRY_USER
|
||||||
|
|||||||
44
Dockerfile
44
Dockerfile
@@ -1,34 +1,28 @@
|
|||||||
ARG ARTIFACTORY
|
ARG ARTIFACTORY
|
||||||
FROM ${ARTIFACTORY}/podman/stable:latest
|
FROM ${ARTIFACTORY}/podman/stable:latest
|
||||||
|
|
||||||
# Adding on the docker alias, docker-compose and other useful stuff
|
# Adding on the docker alias, docker-compose and other useful stuff including the Azure CLI and RPM build tools along with FPM
|
||||||
RUN dnf install -y podman-docker buildah skopeo docker-compose \
|
RUN dnf install -y podman-docker buildah skopeo docker-compose \
|
||||||
util-linux ansible-core openssh-clients krb5-devel krb5-libs krb5-workstation git jq wget curl unzip coreutils \
|
util-linux ansible-core openssh-clients krb5-devel krb5-libs krb5-workstation git jq wget curl unzip coreutils \
|
||||||
helm doctl kubernetes-client gnupg2 pinentry expect gh awscli
|
helm doctl kubernetes-client gnupg2 pinentry expect gh awscli \
|
||||||
|
&& rpm --import https://packages.microsoft.com/keys/microsoft.asc \
|
||||||
# Adding the Azure CLI
|
|
||||||
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc \
|
|
||||||
&& dnf install -y https://packages.microsoft.com/config/rhel/9.0/packages-microsoft-prod.rpm \
|
&& dnf install -y https://packages.microsoft.com/config/rhel/9.0/packages-microsoft-prod.rpm \
|
||||||
&& dnf install -y azure-cli
|
&& dnf install -y azure-cli \
|
||||||
|
&& dnf install -y rpm-build rpm-sign rubygems ruby-devel gcc gcc-c++ make libffi-devel \
|
||||||
|
&& dnf clean all \
|
||||||
|
&& rm -rf /var/cache/yum \
|
||||||
|
&& wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq \
|
||||||
|
&& chmod +x /usr/bin/yq \
|
||||||
|
&& touch /etc/containers/nodocker
|
||||||
|
|
||||||
# Adding some Ansible Key and Timeout setting
|
# Adding some Ansible Key and Timeout setting as well as accepting ssh-rsa
|
||||||
ENV ANSIBLE_HOST_KEY_CHECKING=False
|
ENV ANSIBLE_HOST_KEY_CHECKING=False \
|
||||||
ENV ANSIBLE_TIMEOUT=60
|
ANSIBLE_TIMEOUT=120 \
|
||||||
RUN printf "\nStrictHostKeyChecking no\n" >> /etc/ssh/ssh_config
|
GPG_TTY=/dev/console
|
||||||
ENV GPG_TTY /dev/console
|
COPY ssh_ansible.conf /etc/ssh/ssh_config.d/99-ansible.conf
|
||||||
|
|
||||||
# Adding RPM build tools along with FPM
|
# Ensuring the fpm tool is installed to build distro packages such as RPM and DEB
|
||||||
RUN dnf install -y rpm-build rpm-sign rubygems ruby-devel gcc gcc-c++ make libffi-devel
|
|
||||||
|
|
||||||
RUN gem install ffi \
|
|
||||||
&& gem install fpm
|
|
||||||
COPY rpm-sign-expect /usr/bin
|
COPY rpm-sign-expect /usr/bin
|
||||||
|
RUN gem install ffi \
|
||||||
RUN chmod +x /usr/bin/rpm-sign-expect
|
&& gem install fpm \
|
||||||
|
&& chmod +x /usr/bin/rpm-sign-expect
|
||||||
# Get the latest version of the unpackage yq utility
|
|
||||||
RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq \
|
|
||||||
&& chmod +x /usr/bin/yq
|
|
||||||
|
|
||||||
# Remove the Emulate Docker CLI using podman messages
|
|
||||||
RUN touch /etc/containers/nodocker
|
|
||||||
3
ssh_ansible.conf
Normal file
3
ssh_ansible.conf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
StrictHostKeyChecking no
|
||||||
|
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||||
|
HostKeyAlgorithms +ssh-rsa
|
||||||
Reference in New Issue
Block a user