Test release pipeline #7

Merged
chris merged 13 commits from testing into release 2023-12-08 23:27:54 -05:00
4 changed files with 339 additions and 23 deletions

View File

@ -1,19 +1,21 @@
--- ---
##########################
# CENTOS STREAM 9: TESTING
##########################
kind: pipeline kind: pipeline
type: exec type: exec
name: ansible_dev_centos_stream9 name: ansible_dev_centos_stream9-test
trigger: trigger:
branch: branch:
exclude: - testing
- main
event: [push] event: [push]
status: [success] status: [success]
steps: steps:
- name: check_env - name: check_environment
commands: commands:
- hostnamectl - hostnamectl
- env - env
@ -33,9 +35,9 @@ steps:
GITEA_PASSWORD : GITEA_PASSWORD :
from_secret: gitea_password from_secret: gitea_password
commands: commands:
- echo "$GITEA_PASSWORD" | docker login --username chris --password-stdin $REGISTRY - echo "$GITEA_PASSWORD" | docker login --username $GITEA_USER --password-stdin $REGISTRY
- name: docker_build - name: docker_build_and_push
environment: environment:
REGISTRY : REGISTRY :
from_secret: build_registry from_secret: build_registry
@ -46,19 +48,39 @@ steps:
commands: commands:
- echo "docker build --no-cache -f build/Containerfile.centos-stream9 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER ." - echo "docker build --no-cache -f build/Containerfile.centos-stream9 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER ."
- docker build --no-cache -f build/Containerfile.centos-stream9 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER . - docker build --no-cache -f build/Containerfile.centos-stream9 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER .
- name: docker_push
environment:
REGISTRY :
from_secret: build_registry
BUILD_PREFIX :
from_secret: build_prefix
BUILD_NAME :
from_secret: build_name_centos9
commands:
- docker push $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER - docker push $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER
- docker images | grep "$REGISTRY/$BUILD_PREFIX/$BUILD_NAME"
- name: docker_image_list
---
##########################
# CENTOS STREAM 9: RELEASE
##########################
kind: pipeline
type: exec
name: ansible_dev_centos_stream9-rel
trigger:
branch:
- release
event: [push]
status: [success]
steps:
- name: docker_login
environment:
REGISTRY : gitea.thezengarden.net
GITEA_USER :
from_secret: gitea_user
GITEA_PASSWORD :
from_secret: gitea_password
commands:
- echo "$GITEA_PASSWORD" | docker login --username $GITEA_USER --password-stdin $REGISTRY
- name: docker_build_and_push
environment: environment:
REGISTRY : REGISTRY :
from_secret: build_registry from_secret: build_registry
@ -67,4 +89,291 @@ steps:
BUILD_NAME : BUILD_NAME :
from_secret: build_name_centos9 from_secret: build_name_centos9
commands: commands:
- docker build -f build/Containerfile.centos-stream9 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER .
- docker push $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER
- docker images | grep "$REGISTRY/$BUILD_PREFIX/$BUILD_NAME"
---
####################
# FEDORA 39: TESTING
####################
kind: pipeline
type: exec
name: ansible_dev_fedora39-test
trigger:
branch:
- testing
event: [push]
status: [success]
steps:
- name: check_environment
commands:
- hostnamectl
- env
- whoami
- pwd
- tree
- name: docker_info
commands:
- docker info
- name: docker_login
environment:
REGISTRY : gitea.thezengarden.net
GITEA_USER :
from_secret: gitea_user
GITEA_PASSWORD :
from_secret: gitea_password
commands:
- echo "$GITEA_PASSWORD" | docker login --username $GITEA_USER --password-stdin $REGISTRY
- name: docker_build_and_push
environment:
REGISTRY :
from_secret: build_registry
BUILD_PREFIX :
from_secret: build_prefix
BUILD_NAME :
from_secret: build_name_fedora39
commands:
- echo "docker build --no-cache -f build/Containerfile.fedora39 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER ."
- docker build --no-cache -f build/Containerfile.fedora39 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER .
- docker push $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER
- docker images | grep "$REGISTRY/$BUILD_PREFIX/$BUILD_NAME"
---
####################
# FEDORA 39: RELEASE
####################
kind: pipeline
type: exec
name: ansible_dev_fedora39-rel
trigger:
branch:
- release
event: [push]
status: [success]
steps:
- name: docker_login
environment:
REGISTRY : gitea.thezengarden.net
GITEA_USER :
from_secret: gitea_user
GITEA_PASSWORD :
from_secret: gitea_password
commands:
- echo "$GITEA_PASSWORD" | docker login --username $GITEA_USER --password-stdin $REGISTRY
- name: docker_build_and_push
environment:
REGISTRY :
from_secret: build_registry
BUILD_PREFIX :
from_secret: build_prefix
BUILD_NAME :
from_secret: build_name_fedora39
commands:
- docker build -f build/Containerfile.fedora39 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER .
- docker push $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER
- docker images | grep "$REGISTRY/$BUILD_PREFIX/$BUILD_NAME"
---
####################
# DEBIAN 11: TESTING
####################
kind: pipeline
type: exec
name: ansible_dev_debian11-test
trigger:
branch:
- testing
event: [push]
status: [success]
steps:
- name: check_environment
commands:
- hostnamectl
- env
- whoami
- pwd
- tree
- name: docker_info
commands:
- docker info
- name: docker_login
environment:
REGISTRY : gitea.thezengarden.net
GITEA_USER :
from_secret: gitea_user
GITEA_PASSWORD :
from_secret: gitea_password
commands:
- echo "$GITEA_PASSWORD" | docker login --username $GITEA_USER --password-stdin $REGISTRY
- name: docker_build_and_push
environment:
REGISTRY :
from_secret: build_registry
BUILD_PREFIX :
from_secret: build_prefix
BUILD_NAME :
from_secret: build_name_debian11
commands:
- echo "docker build --no-cache -f build/Containerfile.debian11 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER ."
- docker build --no-cache -f build/Containerfile.debian11 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER .
- docker push $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER
- docker images | grep "$REGISTRY/$BUILD_PREFIX/$BUILD_NAME"
---
####################
# DEBIAN 11: RELEASE
####################
kind: pipeline
type: exec
name: ansible_dev_debian11-rel
trigger:
branch:
- release
event: [push]
status: [success]
steps:
- name: docker_login
environment:
REGISTRY : gitea.thezengarden.net
GITEA_USER :
from_secret: gitea_user
GITEA_PASSWORD :
from_secret: gitea_password
commands:
- echo "$GITEA_PASSWORD" | docker login --username $GITEA_USER --password-stdin $REGISTRY
- name: docker_build_and_push
environment:
REGISTRY :
from_secret: build_registry
BUILD_PREFIX :
from_secret: build_prefix
BUILD_NAME :
from_secret: build_name_debian11
commands:
- docker build -f build/Containerfile.debian11 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER .
- docker push $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER
- docker images | grep "$REGISTRY/$BUILD_PREFIX/$BUILD_NAME"
---
####################
# DEBIAN 12: TESTING
####################
kind: pipeline
type: exec
name: ansible_dev_debian12-test
trigger:
branch:
- testing
event: [push]
status: [success]
steps:
- name: check_environment
commands:
- hostnamectl
- env
- whoami
- pwd
- tree
- name: docker_info
commands:
- docker info
- name: docker_login
environment:
REGISTRY : gitea.thezengarden.net
GITEA_USER :
from_secret: gitea_user
GITEA_PASSWORD :
from_secret: gitea_password
commands:
- echo "$GITEA_PASSWORD" | docker login --username $GITEA_USER --password-stdin $REGISTRY
- name: docker_build_and_push
environment:
REGISTRY :
from_secret: build_registry
BUILD_PREFIX :
from_secret: build_prefix
BUILD_NAME :
from_secret: build_name_debian12
commands:
- echo "docker build --no-cache -f build/Containerfile.debian12 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER ."
- docker build --no-cache -f build/Containerfile.debian12 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER .
- docker push $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER
- docker images | grep "$REGISTRY/$BUILD_PREFIX/$BUILD_NAME"
---
####################
# DEBIAN 12: RELEASE
####################
kind: pipeline
type: exec
name: ansible_dev_debian12-rel
trigger:
branch:
- release
event: [push]
status: [success]
steps:
- name: docker_login
environment:
REGISTRY : gitea.thezengarden.net
GITEA_USER :
from_secret: gitea_user
GITEA_PASSWORD :
from_secret: gitea_password
commands:
- echo "$GITEA_PASSWORD" | docker login --username $GITEA_USER --password-stdin $REGISTRY
- name: docker_build_and_push
environment:
REGISTRY :
from_secret: build_registry
BUILD_PREFIX :
from_secret: build_prefix
BUILD_NAME :
from_secret: build_name_debian12
commands:
- docker build -f build/Containerfile.debian12 -t $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER .
- docker push $REGISTRY/$BUILD_PREFIX/$BUILD_NAME:$CI_COMMIT_BRANCH-$CI_BUILD_NUMBER
- docker images | grep "$REGISTRY/$BUILD_PREFIX/$BUILD_NAME" - docker images | grep "$REGISTRY/$BUILD_PREFIX/$BUILD_NAME"

View File

@ -7,11 +7,14 @@ RUN rm /etc/localtime \
RUN mkdir -p /root/.ssh RUN mkdir -p /root/.ssh
COPY conf/ssh_config /root/.ssh/config COPY conf/ssh_config /root/.ssh/config
COPY conf/hosts /etc/hosts COPY conf/hosts /etc/hosts
COPY python/requirements.txt /tmp/requirements.txt
RUN apt update \ RUN apt update \
&& apt dist-upgrade -y \ && apt dist-upgrade -y \
&& apt autoremove --purge -y \ && apt autoremove --purge -y \
&& apt install -y ansible-core ansible-lint git && apt install -y python3-pip git \
&& pip install pip --upgrade \
&& pip install -r /tmp/requirements.txt
COPY ansible/ansible-check.yml /tmp/ansible-check.yml COPY ansible/ansible-check.yml /tmp/ansible-check.yml

View File

@ -7,11 +7,14 @@ RUN rm /etc/localtime \
RUN mkdir -p /root/.ssh RUN mkdir -p /root/.ssh
COPY conf/ssh_config /root/.ssh/config COPY conf/ssh_config /root/.ssh/config
COPY conf/hosts /etc/hosts COPY conf/hosts /etc/hosts
COPY python/requirements.txt /tmp/requirements.txt
RUN apt update \ RUN apt update \
&& apt dist-upgrade -y \ && apt dist-upgrade -y \
&& apt autoremove --purge -y \ && apt autoremove --purge -y \
&& apt install -y ansible-core ansible-lint git && apt install -y python3-pip git \
&& pip install pip --upgrade --break-system-packages \
&& pip install -r /tmp/requirements.txt --break-system-packages
COPY ansible/ansible-check.yml /tmp/ansible-check.yml COPY ansible/ansible-check.yml /tmp/ansible-check.yml

View File

@ -8,11 +8,12 @@ RUN mkdir -p /root/.ssh
COPY conf/ssh_config /root/.ssh/config COPY conf/ssh_config /root/.ssh/config
COPY conf/hosts /etc/hosts COPY conf/hosts /etc/hosts
COPY conf/dnf.conf /etc/dnf/dnf.conf COPY conf/dnf.conf /etc/dnf/dnf.conf
# COPY python/requirements.txt /tmp/requirements.txt COPY python/requirements.txt /tmp/requirements.txt
RUN dnf install -y python3-pip git ansible-core python3-ansible-lint # RUN dnf install -y python3-pip git ansible-core python3-ansible-lint
# && pip install pip --upgrade \ RUN dnf install -y python3-pip git \
# && pip install -r /tmp/requirements.txt && pip install pip --upgrade \
&& pip install -r /tmp/requirements.txt
COPY ansible/ansible-check.yml /tmp/ansible-check.yml COPY ansible/ansible-check.yml /tmp/ansible-check.yml