Updates to bring us up-to-date
Some checks failed
Docker Image Build Pipeline / Clean-Stale-Artifacts (push) Successful in 3s
Docker Image Build Pipeline / Check-Environment (push) Successful in 1s
Docker Image Build Pipeline / Clone-Repo (push) Failing after 0s
Docker Image Build Pipeline / Build-Images (push) Has been skipped
Docker Image Build Pipeline / Push-Images (push) Has been skipped
Docker Image Build Pipeline / Cleanup-Build-Images (push) Has been skipped
Docker Image Build Pipeline / Cleanup-Docker-Login (push) Has been skipped
Some checks failed
Docker Image Build Pipeline / Clean-Stale-Artifacts (push) Successful in 3s
Docker Image Build Pipeline / Check-Environment (push) Successful in 1s
Docker Image Build Pipeline / Clone-Repo (push) Failing after 0s
Docker Image Build Pipeline / Build-Images (push) Has been skipped
Docker Image Build Pipeline / Push-Images (push) Has been skipped
Docker Image Build Pipeline / Cleanup-Build-Images (push) Has been skipped
Docker Image Build Pipeline / Cleanup-Docker-Login (push) Has been skipped
This commit is contained in:
@ -13,12 +13,12 @@ jobs:
|
||||
working-directory: /home/builds/src/ansible-dev
|
||||
|
||||
steps:
|
||||
- name: "Checkout branch: ${{ env.GITHUB_REF_NAME }}"
|
||||
- name: "Checkout Branch: ${{ env.GITHUB_REF_NAME }}"
|
||||
run: |
|
||||
git fetch origin ${{ env.GITHUB_REF_NAME }}:${{ env.GITHUB_REF_NAME }}
|
||||
git checkout ${{ env.GITHUB_REF_NAME }}
|
||||
|
||||
- name: Verify current commit
|
||||
- name: Verify Current Commit
|
||||
run: git log -1
|
||||
|
||||
|
||||
@ -45,10 +45,10 @@ jobs:
|
||||
runs-on: self-hosted
|
||||
needs: [Build-Images]
|
||||
steps:
|
||||
- name: Docker login
|
||||
- name: Docker Login
|
||||
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login --username ${{ secrets.REGISTRY_USER }} --password-stdin ${{ vars.REGISTRY }}
|
||||
|
||||
- name: Push images to registry
|
||||
- name: Push Images to Registry
|
||||
run: |
|
||||
pwd
|
||||
docker push ${{ vars.REGISTRY }}/${{ env.GITHUB_REPOSITORY }}/${{ vars.BUILD_NAME_FEDORA }}:${{ env.GITHUB_REF_NAME }}
|
||||
@ -59,7 +59,7 @@ jobs:
|
||||
runs-on: self-hosted
|
||||
needs: [Build-Images, Push-Images]
|
||||
steps:
|
||||
- name: Cleanup build images
|
||||
- name: Cleanup Build Images
|
||||
run: |
|
||||
pwd
|
||||
docker rmi ${{ vars.REGISTRY }}/${{ env.GITHUB_REPOSITORY }}/${{ vars.BUILD_NAME_FEDORA }}:${{ env.GITHUB_REF_NAME }}
|
||||
|
@ -6,29 +6,29 @@ on:
|
||||
- testing
|
||||
|
||||
jobs:
|
||||
Cleanup-Old-Artifacts:
|
||||
Clean-Stale-Artifacts:
|
||||
runs-on: self-hosted
|
||||
defaults:
|
||||
run:
|
||||
working-directory: /home/builds/src
|
||||
|
||||
steps:
|
||||
- name: Cleanup old code
|
||||
- name: Cleanup Stale Artifacts
|
||||
run: rm -rfv *
|
||||
|
||||
- name: Cleanup old build cache
|
||||
- name: Cleanup Build Cache
|
||||
run: docker system prune -af
|
||||
|
||||
|
||||
Check-Environment:
|
||||
runs-on: self-hosted
|
||||
needs: [Cleanup-Old-Artifacts]
|
||||
needs: [Clean-Stale-Artifacts]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: /home/builds/src
|
||||
|
||||
steps:
|
||||
- name: Environment check
|
||||
- name: Environment Check
|
||||
run: |
|
||||
echo "BUILD_USER: $(whoami)" && echo
|
||||
echo "PWD: $(pwd)" && echo
|
||||
@ -46,13 +46,13 @@ jobs:
|
||||
working-directory: /home/builds/src
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
- name: Clone Repository
|
||||
run: |
|
||||
git clone https://gitea.thezengarden.net/podman/ansible-dev.git
|
||||
git clone ${{ vars.GITHUB_SERVER_URL }}/${{ vars.GITHUB_REPOSITORY }}
|
||||
cd ansible-dev
|
||||
git checkout ${{ env.GITHUB_REF_NAME }}
|
||||
|
||||
- name: Verify current commit
|
||||
- name: Verify Current Commit
|
||||
run: cd ansible-dev && git log -1
|
||||
|
||||
|
||||
@ -79,10 +79,10 @@ jobs:
|
||||
runs-on: self-hosted
|
||||
needs: [Build-Images]
|
||||
steps:
|
||||
- name: Docker login
|
||||
- name: Docker Login
|
||||
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login --username ${{ secrets.REGISTRY_USER }} --password-stdin ${{ vars.REGISTRY }}
|
||||
|
||||
- name: Push images to registry
|
||||
- name: Push Images to Registry
|
||||
run: |
|
||||
pwd
|
||||
docker push ${{ vars.REGISTRY }}/${{ env.GITHUB_REPOSITORY }}/${{ vars.BUILD_NAME_FEDORA }}:${{ env.GITHUB_REF_NAME }}
|
||||
@ -93,7 +93,7 @@ jobs:
|
||||
runs-on: self-hosted
|
||||
needs: [Build-Images, Push-Images]
|
||||
steps:
|
||||
- name: Cleanup build images
|
||||
- name: Cleanup Build Images
|
||||
run: |
|
||||
pwd
|
||||
docker rmi ${{ vars.REGISTRY }}/${{ env.GITHUB_REPOSITORY }}/${{ vars.BUILD_NAME_FEDORA }}:${{ env.GITHUB_REF_NAME }}
|
||||
@ -104,5 +104,5 @@ jobs:
|
||||
runs-on: self-hosted
|
||||
needs: [Push-Images]
|
||||
steps:
|
||||
- name: Cleanup Docker login
|
||||
- name: Cleanup Docker Login
|
||||
run: rm -v /home/builds/.docker/config.json
|
||||
|
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Build Status: 
|
||||
|
||||
This provides the framework for testing in our environment.
|
@ -8,7 +8,7 @@ RUN mkdir -p /root/.ssh
|
||||
COPY conf/ssh_config /root/.ssh/config
|
||||
COPY conf/hosts /etc/hosts
|
||||
COPY conf/dnf.conf /etc/dnf/dnf.conf
|
||||
COPY python/requirements.txt /tmp/requirements.txt
|
||||
COPY python/requirements-centos.txt /tmp/requirements.txt
|
||||
|
||||
# RUN dnf install -y python3-pip git ansible-core python3-ansible-lint
|
||||
RUN dnf update -y \
|
||||
@ -18,4 +18,5 @@ RUN dnf update -y \
|
||||
|
||||
COPY ansible/ansible-check.yml /tmp/ansible-check.yml
|
||||
|
||||
WORKDIR /root
|
||||
CMD ["/bin/bash"]
|
||||
|
@ -18,4 +18,5 @@ RUN apt update \
|
||||
|
||||
COPY ansible/ansible-check.yml /tmp/ansible-check.yml
|
||||
|
||||
WORKDIR /root
|
||||
CMD ["/bin/bash"]
|
||||
|
@ -12,10 +12,11 @@ COPY python/requirements.txt /tmp/requirements.txt
|
||||
|
||||
# RUN dnf install -y python3-pip git ansible-core python3-ansible-lint
|
||||
RUN dnf update -y \
|
||||
&& dnf install -y python3-pip python3-devel gcc git systemd nodejs tree procps-ng \
|
||||
&& dnf install -y python3-pip python3-devel gcc git systemd nodejs tree procps-ng python3-libdnf5 \
|
||||
&& pip install pip --upgrade \
|
||||
&& pip install -r /tmp/requirements.txt
|
||||
|
||||
COPY ansible/ansible-check.yml /tmp/ansible-check.yml
|
||||
|
||||
WORKDIR /root
|
||||
CMD ["/bin/bash"]
|
||||
|
2
python/requirements-centos.txt
Normal file
2
python/requirements-centos.txt
Normal file
@ -0,0 +1,2 @@
|
||||
ansible-core==2.14.18
|
||||
ansible-lint==6.22.2
|
4
scripts/build_images.sh
Executable file
4
scripts/build_images.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
podman build -f build/Containerfile.centos -t local/ansible-dev-centos:latest .
|
||||
podman build -f build/Containerfile.centos -t local/ansible-dev-debian:latest .
|
||||
podman build -f build/Containerfile.fedora -t local/ansible-dev-fedora:latest .
|
Reference in New Issue
Block a user