diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1647a470a910aa9e9d7a0a34e258d2a29b6f3aa3..9b7c354263fdd4feae1bf6af6fbef4489f3a18ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,8 +2,8 @@ image: docker:20.10.21 variables: - DOCKER_TLS_CERTDIR: "/certs" - DOCKER_BUILDKIT: 1 + DOCKER_TLS_CERTDIR: "/certs" + DOCKER_BUILDKIT: 1 services: - docker:dind @@ -11,11 +11,35 @@ services: build: stage: build script: + # Install requirements for creator-ee scripts + - apk add curl git bash py3-pip podman + + # download creator-ee submodule, as it doesn't get fetched automatically + - git submodule update --init --recursive + + # install taskfile, called using "task" + - sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d + # Extend PATH to contain task and ansible (installed later) + - export PATH=$PATH:$(pwd)/bin:/root/.local/bin + + # no idea, might be required, was in the repository earlier as well... - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 - --cache-from $CI_REGISTRY_IMAGE:latest - --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA - --tag $CI_REGISTRY_IMAGE:latest - "." - - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA - - docker push $CI_REGISTRY_IMAGE:latest + + # move to the right directory to prepare executing buildscript + - cd creator-ee + + # https://github.com/webdevops/Dockerfile/issues/266 + - echo 'Ansible refuses to read from a world-writeable folder, hence' && chmod -v 700 $(pwd) + + # install ansible to get ansible-galaxy + - python3 -m pip install --user ansible + + # finally start building the CI image + - task build + #- docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 + #--cache-from $CI_REGISTRY_IMAGE:latest + #--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA + #--tag $CI_REGISTRY_IMAGE:latest + #"." + # - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA + # - docker push $CI_REGISTRY_IMAGE:latest diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000000000000000000000000000000000..bb624b56658e4b5aee016a15ec5dca7fc3d4025e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "creator-ee"] + path = creator-ee + url = https://github.com/ansible/creator-ee/ diff --git a/creator-ee b/creator-ee new file mode 160000 index 0000000000000000000000000000000000000000..10f321890edda4e722c46c0b6f68af9d3debf25f --- /dev/null +++ b/creator-ee @@ -0,0 +1 @@ +Subproject commit 10f321890edda4e722c46c0b6f68af9d3debf25f