Skip to content
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

Output last commit when using Git.clone() or Git.checkout() #37

Open
nodeg opened this issue Aug 14, 2024 · 0 comments
Open

Output last commit when using Git.clone() or Git.checkout() #37

nodeg opened this issue Aug 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@nodeg
Copy link
Member

nodeg commented Aug 14, 2024

A nice addition would be to output the last commit when using Git.clone() or Git.checkout() from the repo that is used. In Jenkins for example, we do also get the last commit from the pipeline repository (see Commit message below):

[2024-08-14T13:37:14.228Z] The recommended git tool is: git
[2024-08-14T13:37:14.231Z] No credentials specified
[2024-08-14T13:37:14.233Z] Cloning the remote Git repository
[2024-08-14T13:37:14.234Z] Cloning repository https://github.com/SUSE/susemanager-ci.git
[2024-08-14T13:37:14.234Z]  > git init /home/jenkins/workspace/uyuni-master-qe-build-validation-NUE/susemanager-ci # timeout=10
[2024-08-14T13:37:14.239Z] Fetching upstream changes from https://github.com/SUSE/susemanager-ci.git
[2024-08-14T13:37:14.239Z]  > git --version # timeout=10
[2024-08-14T13:37:14.242Z]  > git --version # 'git version 2.43.0'
[2024-08-14T13:37:14.242Z]  > git fetch --tags --force --progress -- https://github.com/SUSE/susemanager-ci.git +refs/heads/*:refs/remotes/origin/* # timeout=10
[2024-08-14T13:37:15.368Z] Avoid second fetch
[2024-08-14T13:37:15.379Z] Checking out Revision 2fe85ced98930e589ab1daff9a8685e9de9a1458 (origin/master)
[2024-08-14T13:37:15.405Z] Commit message: "Fix Salt bundle for SLE Micros in the Uyuni BV"
[2024-08-14T13:37:15.353Z]  > git config remote.origin.url https://github.com/SUSE/susemanager-ci.git # timeout=10
[2024-08-14T13:37:15.360Z]  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
[2024-08-14T13:37:15.369Z]  > git rev-parse origin/master^{commit} # timeout=10
[2024-08-14T13:37:15.380Z]  > git config core.sparsecheckout # timeout=10
[2024-08-14T13:37:15.383Z]  > git checkout -f 2fe85ced98930e589ab1daff9a8685e9de9a1458 # timeout=10

Since we use terracumber to e.g. clone sumaform, it would be nice to also have the last commit message printed out.

@nodeg nodeg added the enhancement New feature or request label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant