Skip to content

Commit

Permalink
updating workflow (#158)
Browse files Browse the repository at this point in the history
* testing on branch (#142)

* testing a new build

* updating docker login action to v3

---------

Co-authored-by: David Danielsson <[email protected]>

* Update ci_testing.yaml

* Update ci_testing.yaml

* renamed:    .github/workflows/ci_testing.yaml -> .github/workflows/ci_testing.yml

* modified:   .github/workflows/ci_testing.yml

* modified:   .github/tests/build_ee.yml

* modified:   .github/tests/build_ee.yml

* modified:   .github/tests/build_ee.yml
	modified:   .github/workflows/ci_testing.yml

* modified:   .github/workflows/ci_testing.yml

* modified:   .github/workflows/ci_testing.yml

* modified:   .github/tests/build_ee.yml

* modified:   .github/tests/build_ee.yml
	modified:   .github/workflows/ci_testing.yml

* modified:   .github/tests/build_ee.yml

* modified:   .github/workflows/ci_testing.yml

* modified:   .github/tests/build_ee.yml
	deleted:    .github/tests/ee_builder.yaml
	modified:   .github/workflows/pre-commit.yml
	modified:   .github/workflows/update_pre_commit.yml

* modified:   .github/tests/build_ee.yml

* modified:   .github/tests/build_ee.yml
	modified:   .github/workflows/ci_testing.yml
  • Loading branch information
djdanielsson authored Jun 18, 2024
1 parent 4e44ac2 commit 53cc8ee
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 27 deletions.
28 changes: 15 additions & 13 deletions .github/tests/build_ee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
pre_tasks:
- name: Validate that ansible-builder is installed on target system
block:
- name: Try command
- name: Try command # noqa command-instead-of-shell
ansible.builtin.shell: ansible-builder --version
register: r_builder
changed_when: false
Expand All @@ -22,7 +22,7 @@
state: present
become: true
rescue:
- name: Install ansible-builder from pip
- name: Install ansible-builder from pip # noqa package-latest
ansible.builtin.pip:
name:
- ansible-builder
Expand All @@ -35,28 +35,30 @@
name: ee_builder
vars:
ee_pull_collections_from_hub: false
ee_container_runtime: podman
ee_base_image: quay.io/centos/centos:stream9
ee_list:
- name: config_as_code_ee
dependencies:
ansible_core:
package_pip: ansible-core
ansible_runner:
package_pip: ansible-runner
system:
- unzip
python:
- ansible-lint
- netaddr
galaxy:
collections:
- name: infra.controller_configuration
- name: infra.ah_configuration
- name: infra.ee_utilities
- name: infra.aap_utilities
- name: infra.eda_configuration
type: git
source: https://github.com/redhat-cop/eda_configuration.git
- name: awx.awx
- infra.controller_configuration
- infra.ah_configuration
- infra.eda_configuration
- infra.ee_utilities
- infra.aap_utilities
- awx.awx
build_steps:
append_final:
- RUN true && microdnf clean all && microdnf upgrade --refresh && microdnf clean all && true
- RUN yum update -y
- RUN cat /etc/redhat-r*
options:
package_manager_path: /usr/bin/microdnf
...
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
---
name: Run Test of EE utilities
on:
push:
pull_request:
on: [push]

jobs:
Integration-test:
name: Run Test of EE utilities
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install podman
run: sudo apt -y install podman

- name: Install Ansible and Ansible Builder
run: pip install --upgrade ansible-core ansible-builder
run: pip install --upgrade setuptools ansible-core ansible-builder

- name: Move ansible.cfg to root
run: mv .github/files/ansible.cfg .

- name: Install Dependencies
run: ansible-galaxy collection install containers.podman -f

- name: Docker login
uses: docker/login-action@v3
with:
registry: quay.io
username: redhat_cop+github_action
password: ${{ secrets.quay_token }}
- name: podman login
run: podman login quay.io --username redhat_cop+github_action --password ${{ secrets.quay_token }}

- name: Build EE
run: ansible-playbook .github/tests/build_ee.yml -e "ee_registry_username=redhat_cop+github_action" -e "ee_registry_password=${{ secrets.quay_token }}" --connection=local -e "ee_registry_dest=quay.io/redhat_cop/config_as_code_ee" -vvv
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# See .pre-commit-config.yaml for what hooks are executed
name: pre-commit tests


on:
pull_request:
push:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/update_pre_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# See .pre-commit-config.yaml for what hooks are executed
name: Update pre-commit configuration


on:
schedule:
- cron: "0 5 * * *"
Expand Down

0 comments on commit 53cc8ee

Please sign in to comment.