-
Notifications
You must be signed in to change notification settings - Fork 21
feat: add Stackit-cli support for different package managers (zypper, dnf) #909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
cache: true | ||
|
||
- name: Install GoReleaser | ||
run: go install github.com/goreleaser/goreleaser/v2@latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use https://github.com/goreleaser/goreleaser-action like we do in the release workflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice with those testing scripts (I am still reviewing and need to test 😇).
Can you rebase your commits a little bit (remove some of them e.g. via git rebase -i).?
# aptly version 1.6.0 results in an segmentation fault. Therefore we fall back to version 1.5.0. | ||
# Since it is not possible to specify a version via brew command a formula was added for aptly 1.5.0 | ||
# (source: https://github.com/Homebrew/homebrew-core/pull/202415/files) | ||
- name: Install Aptly version 1.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you are installing this on ubuntu it seems to be that this is not version 1.5.0 anymore. Does this work on ubuntu so was the mentioned isse with aptly version 1.6.0 only an issue on mac?
If so, then the added brew formula can be removed and of course this note as well.
- name: Publish packages to APT repo | ||
if: contains(github.ref_name, '-') == false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed?
@@ -0,0 +1,42 @@ | |||
version: 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my understanding: This will be added/merged later to the .goreleaser.yaml, right?
docker exec $CONTAINER_NAME bash -c " | ||
if command -v stackit >/dev/null 2>&1; then | ||
echo '✅ stackit command found: \$(which stackit)' | ||
echo '✅ Version: \$(stackit version)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work on my side. I get the plain output of "which stackit".
echo '✅ Version: \$(stackit version)' | |
echo "✅ stackit command found: $(which stackit)" |
If changing to this I get the error: "stackit command not found"
docker exec $CONTAINER_NAME bash -c " | ||
if command -v stackit >/dev/null 2>&1; then | ||
echo '✅ stackit command found: \$(which stackit)' | ||
echo '✅ Version: \$(stackit version)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
@@ -0,0 +1,117 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to keep those test files:
Most of the content from almalinux fedora, rhel9 and rocky9 are the same. Is there a possibility to use one generic script for them?
Same maybe for the two opensuse scripts.
if ! command -v stackit >/dev/null 2>&1; then | ||
echo '✅ stackit command no longer found' | ||
else | ||
echo '❌ stackit command still found: \$(which stackit)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get there in my test but here would be the same issue
docker exec $CONTAINER_NAME bash -c " | ||
zypper clean --all | ||
zypper refresh | ||
zypper repos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting an error here. It seems to be that the Repository of the Stackit CLI is present but could not be refreshed. However the installation step works. Have you seen this on your side as well?
Repository 'STACKIT CLI Repository' is invalid.
[stackit-cli|https://distribution-test.object.storage.eu01.onstackit.cloud/rpm/cli] Failed to retrieve new repository metadata.
History:
- Signature verification failed for repomd.xml
Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'STACKIT CLI Repository' because of the above error.
Some of the repositories have not been refreshed because of an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same message for the other opensuse script (The output above is with "--non-interactive" for zypper, just tested this as well. So the message without this is slightly different.
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
JIRA-Ticket: https://jira.schwarz/secure/RapidBoard.jspa?rapidView=41274&view=detail&selectedIssue=STACKITCLI-213#
What Was Implemented:
Overview of the workflow (isolated and stripped down for testing):
rpm-test.yml (worfklow starts when pushed on this branch) => release-rpm.sh (setup gpg & calls goreleaser) => goreleaser.rpm.yml (builds & signs the rpm packages) => rpm-test.yml (worfklow continues) => publish-rpm-repo.sh (creates a rpm repo and rpm metadata for the already created rpm packages & signs rpm metadata & publishes to distribution-test bucket for now)
Testing-Instructions for supported distributions (having RPM Version +4.15 for ed25519 signature of gpg Key)
Fedora 35+ => ./scripts/test-fedora.sh [ ]
RHEL 9+ => ./scripts/test-rhel9.sh [ ]
AlmaLinux 9+ => ./scripts/test-almalinux9.sh [ ]
Rocky Linux 9+ => ./scripts/test-rocky9.sh [ ]
OpenSUSE Tumbleweed => ./scripts/test-opensuse.sh [ ]
Next ToDos after changes were reviewed:
Cleanup and clarify:
Checklist
make fmt
make generate-docs
(will be checked by CI)make test
(will be checked by CI)make lint
(will be checked by CI)