Compare commits
54 Commits
developmen
...
master
Author | SHA1 | Date | |
---|---|---|---|
67a16310c6 | |||
97fac15bf9 | |||
3ba4f02181 | |||
ee4f82bdb4 | |||
1f4cffe811 | |||
08c58eb284 | |||
1194997a74 | |||
4472d467e4 | |||
d50159c058 | |||
7af16b5b5a | |||
6707a9bd9a | |||
9a54f418cf | |||
2ef2641d47 | |||
b8e95cb06c | |||
16f2ad04f3 | |||
4a2ba92388 | |||
1f7519f37d | |||
53596b146e | |||
493812e8dc | |||
dabfb9f153 | |||
7dd76ea5dd | |||
e4f53b7870 | |||
e81bd01e8c | |||
fe598051bf | |||
9bc5392e50 | |||
b429c97495 | |||
88034af87d | |||
6a268594a9 | |||
b807d027d2 | |||
a47a816fa5 | |||
001a6772ea | |||
fec15a5c3c | |||
f667038d1a | |||
26c8de0d67 | |||
def1eb3bb5 | |||
a0ff0f5318 | |||
864b183a66 | |||
939d960cc1 | |||
69492c04b8 | |||
e31e5e14e1 | |||
84693d54ea | |||
ff53ef8ab1 | |||
8fedf67148 | |||
e3e599ce59 | |||
adc58a4648 | |||
160c5ec9a5 | |||
0ebd86748e | |||
ac8e9e44ed | |||
8847fc1f9d | |||
99398d1574 | |||
415855faad | |||
6a14049442 | |||
188bf92ff3 | |||
2f26dc6997 |
@ -17,7 +17,6 @@ include:
|
||||
- template/automagic.gitlab-ci.yaml
|
||||
#- template: Jobs/Container-Scanning.gitlab-ci.yml # see https://gitlab.com/gitlab-org/gitlab/-/issues/381665
|
||||
|
||||
|
||||
.MKDocs_Build:
|
||||
image: python:3.11-buster
|
||||
|
||||
@ -62,57 +61,3 @@ Build/Cache Python Packages:
|
||||
allow_failure: true
|
||||
when: manual
|
||||
- when: never
|
||||
|
||||
|
||||
Docker Container:
|
||||
extends: .build_docker_container
|
||||
resource_group: build
|
||||
needs: []
|
||||
script:
|
||||
- update-binfmts --display
|
||||
- |
|
||||
|
||||
if [ "0$DOCKER_IMAGE_BUILD_TARGET_PLATFORMS" != "0" ]; then
|
||||
|
||||
echo "[DEBUG] building multiarch/specified arch image";
|
||||
|
||||
docker buildx build --platform=$DOCKER_IMAGE_BUILD_TARGET_PLATFORMS . \
|
||||
--label org.opencontainers.image.created="$(date '+%Y-%m-%d %H:%M:%S%:z')" \
|
||||
--label org.opencontainers.image.documentation="$CI_PROJECT_URL" \
|
||||
--label org.opencontainers.image.source="$CI_PROJECT_URL" \
|
||||
--label org.opencontainers.image.revision="$CI_COMMIT_SHA" \
|
||||
--push \
|
||||
--build-arg CI_JOB_TOKEN=$CI_JOB_TOKEN --build-arg CI_PROJECT_ID=$CI_PROJECT_ID --build-arg CI_API_V4_URL=$CI_API_V4_URL \
|
||||
--build-arg CI_COMMIT_SHA=$CI_COMMIT_SHA \
|
||||
--file $DOCKER_DOCKERFILE \
|
||||
--tag $DOCKER_IMAGE_BUILD_REGISTRY/$DOCKER_IMAGE_BUILD_NAME:$DOCKER_IMAGE_BUILD_TAG;
|
||||
|
||||
docker buildx imagetools inspect $DOCKER_IMAGE_BUILD_REGISTRY/$DOCKER_IMAGE_BUILD_NAME:$DOCKER_IMAGE_BUILD_TAG;
|
||||
|
||||
# during docker multi platform build there are >=3 additional unknown images added to gitlab container registry. cleanup
|
||||
|
||||
DOCKER_MULTI_ARCH_IMAGES=$(docker buildx imagetools inspect "$DOCKER_IMAGE_BUILD_REGISTRY/$DOCKER_IMAGE_BUILD_NAME:$DOCKER_IMAGE_BUILD_TAG" --format "{{ range .Manifest.Manifests }}{{ if ne (print .Platform) \"&{unknown unknown [] }\" }}$DOCKER_IMAGE_BUILD_REGISTRY/$DOCKER_IMAGE_BUILD_NAME:$DOCKER_IMAGE_BUILD_TAG@{{ println .Digest }}{{end}} {{end}}");
|
||||
|
||||
docker buildx imagetools create $DOCKER_MULTI_ARCH_IMAGES --tag $DOCKER_IMAGE_BUILD_REGISTRY/$DOCKER_IMAGE_BUILD_NAME:$DOCKER_IMAGE_BUILD_TAG;
|
||||
|
||||
docker buildx imagetools inspect $DOCKER_IMAGE_BUILD_REGISTRY/$DOCKER_IMAGE_BUILD_NAME:$DOCKER_IMAGE_BUILD_TAG;
|
||||
|
||||
else
|
||||
|
||||
echo "[DEBUG] building image";
|
||||
|
||||
docker build . \
|
||||
--label org.opencontainers.image.created="$(date '+%Y-%m-%d %H:%M:%S%:z')" \
|
||||
--label org.opencontainers.image.documentation="$CI_PROJECT_URL" \
|
||||
--label org.opencontainers.image.source="$CI_PROJECT_URL" \
|
||||
--label org.opencontainers.image.url="$CI_PROJECT_URL/-/releases/$(cz -n cz_nfc version --project)" \
|
||||
--label org.opencontainers.image.version="$(cz -n cz_nfc version --project)" \
|
||||
--label org.opencontainers.image.revision="$CI_COMMIT_SHA" \
|
||||
--build-arg CI_JOB_TOKEN=$CI_JOB_TOKEN --build-arg CI_PROJECT_ID=$CI_PROJECT_ID --build-arg CI_API_V4_URL=$CI_API_V4_URL \
|
||||
--build-arg CI_COMMIT_SHA=$CI_COMMIT_SHA \
|
||||
--file $DOCKER_DOCKERFILE \
|
||||
--tag $DOCKER_IMAGE_BUILD_REGISTRY/$DOCKER_IMAGE_BUILD_NAME:$DOCKER_IMAGE_BUILD_TAG;
|
||||
|
||||
docker push $DOCKER_IMAGE_BUILD_REGISTRY/$DOCKER_IMAGE_BUILD_NAME:$DOCKER_IMAGE_BUILD_TAG;
|
||||
|
||||
fi
|
@ -8,8 +8,6 @@
|
||||
|
||||

|
||||
|
||||
[](https://hub.docker.com/r/nofusscomputing/ansible-ee) [](https://artifacthub.io/packages/container/nfc-ansible-ee/ansible-ee)
|
||||
|
||||
<br>
|
||||
|
||||
  [](https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/issues)
|
||||
|
18
dockerfile
18
dockerfile
@ -2,7 +2,6 @@ ARG release_name=bookworm
|
||||
|
||||
ARG kubernetes_version=1.29
|
||||
|
||||
ARG CI_COMMIT_SHA=""
|
||||
|
||||
FROM --platform=$TARGETPLATFORM quay.io/ansible/receptor:v1.4.4 as receptor
|
||||
|
||||
@ -34,9 +33,7 @@ RUN curl -fsSL https://pkgs.k8s.io/core:/stable:/v${kubernetes_version}/deb/Rele
|
||||
|
||||
FROM --platform=$TARGETPLATFORM python:3.11-slim-${release_name}
|
||||
|
||||
ARG CI_COMMIT_SHA
|
||||
|
||||
ENV REPO_BUILD_SHA=${CI_COMMIT_SHA}
|
||||
# Ansible chucks a wobbler without. see: https://github.com/ansible/ansible/issues/78283
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
@ -52,11 +49,16 @@ COPY includes /
|
||||
|
||||
# Ref: https://github.com/opencontainers/image-spec/blob/d86384efdb8c30770a92415c100f57a9bffbb64e/annotations.md
|
||||
LABEL \
|
||||
# org.opencontainers.image.authors="{contributor url}" \
|
||||
org.opencontainers.image.vendor="No Fuss Computing" \
|
||||
org.opencontainers.image.title="Ansible Execution Environment" \
|
||||
org.opencontainers.image.description="An ansible execution environment for aap/awx and CI/CD pipelines" \
|
||||
org.opencontainers.image.vendor="No Fuss Computing" \
|
||||
io.artifacthub.package.license="MIT"
|
||||
# org.opencontainers.image.url="{dockerhub url}" \
|
||||
# org.opencontainers.image.documentation="{docs url}" \
|
||||
# org.opencontainers.image.source="{repo url}" \
|
||||
# org.opencontainers.image.revision="{git commit sha at time of build}" \
|
||||
org.opencontainers.image.title="No Fuss Computings Ansible Execution Environment" \
|
||||
org.opencontainers.image.description="An ansible execution environment for awx/tower and CI/CD pipelines" \
|
||||
org.opencontainers.image.vendor="No Fuss Computing"
|
||||
# org.opencontainers.image.version="{git tag}"
|
||||
|
||||
|
||||
RUN apt update \
|
||||
@ -146,5 +148,5 @@ RUN ansible-galaxy collection install \
|
||||
theforeman.foreman==4.0.0; \
|
||||
ansible-galaxy collection install --pre \
|
||||
nofusscomputing.glpi==0.1.0-a1 \
|
||||
nofusscomputing.kubernetes==1.13.2 \
|
||||
nofusscomputing.kubernetes==1.13.0 \
|
||||
nofusscomputing.netbox==0.4.0
|
||||
|
Submodule gitlab-ci updated: 224ef83157...673441f83a
Submodule includes/etc/ansible/playbooks updated: 8b940d30ff...ed4f20d49c
Submodule includes/etc/ansible/roles updated: 73c8bc6f96...7e7d208cf1
Reference in New Issue
Block a user