Skip to content

Commit

Permalink
Merge remote-tracking branch '3.0' into '4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
kiorky committed Oct 15, 2024
2 parents 657a5f9 + d131249 commit f6913ec
Show file tree
Hide file tree
Showing 53 changed files with 2,428 additions and 3,082 deletions.
51 changes: 17 additions & 34 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ env:
NO_SQUASH: ""
NONINTERACTIVE: "1"
FORCE_ONLINE: "1"
CORPUSOPS_ROLES_BRANCH: "4.0"
RELEASABLE_REPOS: "^corpusops/"
RELEASABLE_BRANCHES: "^(refs/heads/)?(4.0)$"
jobs:
Expand All @@ -16,6 +15,12 @@ jobs:
run: |-
tags="${{matrix.image}}_preprovision-${{matrix.ansible_release}}"
rtags="${{matrix.image}}-${{matrix.ansible_release}}"
if [[ -n "${{matrix.ansible_latest}}" ]];then
if [[ "${{matrix.ansible_release }}" == "${{matrix.ansible_latest}}" ]];then
tags="$tags ${{matrix.image}}_preprovision"
rtags="$rtags ${{matrix.image}}"
fi
fi
if ( echo "$GITHUB_REF" | egrep -q "${RELEASABLE_BRANCHES}" ) \
&& ( echo "$GITHUB_REPOSITORY" | egrep -q "${RELEASABLE_REPOS}" )
then releasable=true;else releasable=false;fi
Expand All @@ -30,61 +35,39 @@ jobs:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Activate docker experimental
run: |-
sudo bash -exc "service docker stop;python -c \
sudo bash -exc "if [ ! -e /etc/docker/daemon.json ];then mkdir /etc/docker||true;echo '{}' > /etc/docker/daemon.json;fi;service docker stop;python -c \
\"d='/etc/docker/daemon.json';\
import json;c=json.load(open(d));c['experimental']=True;\
open(d, 'w').write(json.dumps(c))\"
systemctl restart docker"
- uses: actions/checkout@v3
- name: Cache multiple paths
uses: actions/cache@v3
with:
path: |
~/cache
venv3
venv
roles
collections
key: ${{ runner.os }}-${{ github.ref }}-${{ github.repository }}-venvstatics
- name: test installer & init DOTcorpusops
run: |-
set -ex
if [[ -n "${GITHUB_BASE_REF}" ]];then CORPUSOPS_BRANCH="$(git log HEAD|head -n1|awk '{print $2}')"
else CORPUSOPS_BRANCH="${GITHUB_REF//*\/}";fi
echo "Pinning corpusops to branch/changeset: ${CORPUSOPS_BRANCH}" >&2
export CORPUSOPS_BRANCH
if ! ( bin/install.sh -C -S -b ${CORPUSOPS_BRANCH}; );then
echo "Busting venv cache && rebuilding"
rm -rf venv*;bin/install.sh -C -S -b ${CORPUSOPS_BRANCH};fi
if ! ( bin/install.sh -C --synchronize-code );then
rm -rf roles/corpusops.roles;bin/install.sh -C --synchronize-code;fi
cd roles/corpusops.roles
git reset --hard origin/${CORPUSOPS_ROLES_BRANCH:-${CORPUSOPS_BRANCH}}
git log -n1
cd -
- name: Build 1st round image
id: docker_build1
run: |-
set -ex
iid=$(mktemp)
img=${{matrix.image}}_preprovision-${{matrix.ansible_release}}
docker build --iidfile $iid -f "docker/${img}" . --build-arg FORCE_ONLINE=1
for i in ${{steps.v.outputs.tags}};do for t in $i;do docker tag $(cat $iid) $t;done;done
- name: Build 2nd round image
echo "Pinning corpusops branch/changeset: ${CORPUSOPS_BRANCH}" >&2
mkdir .corpusops || true
echo $CORPUSOPS_BRANCH > .corpusops/corpusops_branch
# be sure not to have any cached role or collection
rm -rfv collection*/* roles/* || true
- name: Build image
id: docker_build2
run: |-
set -ex
iid=$(mktemp)
img=${{matrix.image}}-${{matrix.ansible_release}}
docker build --iidfile $iid -f "docker/${img}" . --build-arg FORCE_ONLINE=1
for i in ${{steps.v.outputs.rtags}};do for t in $i;do docker tag $(cat $iid) $t;done;done
docker build --iidfile $iid -f "docker/${img}" . --build-arg FORCE_ONLINE=1 --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from=$img
# preprovision tag is kept & so, then, pushed only for retrocompat.
for i in ${{steps.v.outputs.tags}} ${{steps.v.outputs.rtags}};do for t in $i;do docker tag $(cat $iid) $t;done;done
- name: Push images if needed
run: |-
set -ex;for i in ${{steps.v.outputs.tags}} ${{steps.v.outputs.rtags}};do docker push $i;done
if: ${{steps.v.outputs.releasable == 'true'}}
strategy:
fail-fast: false
matrix:
ansible_latest: [""]
ansible_release: ["2.17"]
image:
- "corpusops/ubuntu:24.04"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
4 changes: 4 additions & 0 deletions bin/cops_ansible
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:18.04_prepr
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:16.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:14.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/centos:7_preprovision"
# disabled: now use multistage built image
BASE_PREPROVISION_IMAGES=""

BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:latest"
BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:24.04"
Expand All @@ -106,6 +108,8 @@ EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bookworm_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bullseye_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:buster_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:sid_preprovision"
# disabled: now use multistage built image
EXP_PREPROVISION_IMAGES=""
EXP_CORE_IMAGES=""
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/archlinux:latest"
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/debian:latest"
Expand Down
4 changes: 4 additions & 0 deletions bin/cops_detect_os
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:18.04_prepr
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:16.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:14.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/centos:7_preprovision"
# disabled: now use multistage built image
BASE_PREPROVISION_IMAGES=""

BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:latest"
BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:24.04"
Expand All @@ -61,6 +63,8 @@ EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bookworm_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bullseye_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:buster_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:sid_preprovision"
# disabled: now use multistage built image
EXP_PREPROVISION_IMAGES=""
EXP_CORE_IMAGES=""
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/archlinux:latest"
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/debian:latest"
Expand Down
4 changes: 4 additions & 0 deletions bin/cops_pkgmgr_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:18.04_prepr
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:16.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:14.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/centos:7_preprovision"
# disabled: now use multistage built image
BASE_PREPROVISION_IMAGES=""

BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:latest"
BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:24.04"
Expand All @@ -61,6 +63,8 @@ EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bookworm_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bullseye_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:buster_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:sid_preprovision"
# disabled: now use multistage built image
EXP_PREPROVISION_IMAGES=""
EXP_CORE_IMAGES=""
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/archlinux:latest"
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/debian:latest"
Expand Down
4 changes: 4 additions & 0 deletions bin/cops_shell_common
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:18.04_prepr
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:16.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:14.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/centos:7_preprovision"
# disabled: now use multistage built image
BASE_PREPROVISION_IMAGES=""

BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:latest"
BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:24.04"
Expand All @@ -70,6 +72,8 @@ EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bookworm_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bullseye_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:buster_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:sid_preprovision"
# disabled: now use multistage built image
EXP_PREPROVISION_IMAGES=""
EXP_CORE_IMAGES=""
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/archlinux:latest"
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/debian:latest"
Expand Down
4 changes: 4 additions & 0 deletions bin/git_pack
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:18.04_prepr
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:16.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:14.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/centos:7_preprovision"
# disabled: now use multistage built image
BASE_PREPROVISION_IMAGES=""

BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:latest"
BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:24.04"
Expand All @@ -61,6 +63,8 @@ EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bookworm_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bullseye_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:buster_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:sid_preprovision"
# disabled: now use multistage built image
EXP_PREPROVISION_IMAGES=""
EXP_CORE_IMAGES=""
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/archlinux:latest"
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/debian:latest"
Expand Down
4 changes: 4 additions & 0 deletions bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:18.04_prepr
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:16.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:14.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/centos:7_preprovision"
# disabled: now use multistage built image
BASE_PREPROVISION_IMAGES=""

BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:latest"
BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:24.04"
Expand All @@ -68,6 +70,8 @@ EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bookworm_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bullseye_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:buster_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:sid_preprovision"
# disabled: now use multistage built image
EXP_PREPROVISION_IMAGES=""
EXP_CORE_IMAGES=""
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/archlinux:latest"
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/debian:latest"
Expand Down
4 changes: 4 additions & 0 deletions bin/silent_run
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:18.04_prepr
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:16.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/ubuntu:14.04_preprovision"
BASE_PREPROVISION_IMAGES="$BASE_PREPROVISION_IMAGES corpusops/centos:7_preprovision"
# disabled: now use multistage built image
BASE_PREPROVISION_IMAGES=""

BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:latest"
BASE_CORE_IMAGES="$BASE_CORE_IMAGES corpusops/ubuntu:24.04"
Expand All @@ -61,6 +63,8 @@ EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bookworm_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:bullseye_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:buster_preprovision"
EXP_PREPROVISION_IMAGES="$EXP_PREPROVISION_IMAGES debian:sid_preprovision"
# disabled: now use multistage built image
EXP_PREPROVISION_IMAGES=""
EXP_CORE_IMAGES=""
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/archlinux:latest"
EXP_CORE_IMAGES="$EXP_CORE_IMAGES corpusops/debian:latest"
Expand Down
Loading

0 comments on commit f6913ec

Please sign in to comment.