Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[KIECLOUD-672] add pkg-update module #557

Merged
merged 1 commit into from
Dec 14, 2022
Merged
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
14 changes: 14 additions & 0 deletions jobss-kie-pkg-update/configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -euo pipefail

for candidate in yum dnf microdnf; do
if command -v "$candidate"; then
mgr="$(command -v "$candidate")"
"$mgr" update -y
"$mgr" -y clean all
exit
fi
done

echo "cannot find a package manager" >&2
exit 1
7 changes: 7 additions & 0 deletions jobss-kie-pkg-update/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
schema_version: 1
name: jboss.kie.pkg-update
version: "1.0"
description: "Perform a system update via the package manager."

execute:
- script: configure