Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
matrix:
include:
- runner: ubuntu-24.04
- runner: ubuntu-24.04-arm64
- runner: ubuntu-24.04-arm64-core

permissions:
contents: read
Expand Down Expand Up @@ -58,6 +58,7 @@ jobs:
- name: Build container
id: build
run: |
set -o pipefail
python3 build.py galaxy_ng ${{ steps.determine-tag.outputs.tag }} | tee /dev/stderr >> $GITHUB_OUTPUT

- name: Log in to GitHub Container Registry
Expand Down
9 changes: 7 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ def run_compose(tag: str, src: str) -> None:
dc_command(['up', '-d'], env=os.environ | {'TAG': tag, 'GALAXY_NG_SRC': src})

print('Prepopulate galaxy...', file=sys.stderr)
dc_command(['wait', 'setup_collections'])
try:
dc_command(['wait', 'setup_collections'])
except subprocess.CalledProcessError:
print('Setup collections failed, dumping logs:', file=sys.stderr)
dc_command(['logs', 'setup_collections'], check=False)
raise

print('Stop compose...', file=sys.stderr)
dc_command(['stop'])
Expand Down Expand Up @@ -104,7 +109,7 @@ def create_data_archive(tmpdir: str) -> str:
archive = 'galaxy-archive.tar'
print('Make volume tarball...', file=sys.stderr)
docker_command(
['exec', '-ti', alpine_id] + [
['exec', alpine_id] + [
'tar', '-cf', f'/{archive}',
'/var/lib/pulp', '/etc/pulp/certs', '/var/lib/postgresql/data',
'/artifacts',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@
from multiprocessing import TimeoutError


COLLECTIONS_BUILD_AND_PUBLISH_TIMEOUT = 300


def publish_collection(module, collection):
output_dir = module.params['output_dir']

Expand Down Expand Up @@ -260,6 +257,7 @@ def run_module():
),
gpg_homedir=dict(type='path', default=None),
output_dir=dict(type='path', default=None),
timeout=dict(type='int', default=300),
)

module = AnsibleModule(
Expand All @@ -275,7 +273,7 @@ def run_module():
try:
result['results'] = pool.map_async(
publish_func, module.params['collections']
).get(timeout=COLLECTIONS_BUILD_AND_PUBLISH_TIMEOUT)
).get(timeout=module.params['timeout'])
except TimeoutError as timeout_err:
module.fail_json(
'Timed out waiting for collections to be provisioned.',
Expand Down
1 change: 1 addition & 0 deletions playbooks/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@
collections: '{{ primary_collections }}'
gpg_homedir: '{{ gpg_homedir }}'
output_dir: '{{ temp_root }}/primary_collections'
timeout: 500
environment:
ANSIBLE_CONFIG: '{{ playbook_dir }}/ansible.cfg'
register: setup_collections
Expand Down