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

[SKIP CI] docker: log git hashes for each projects #5880

Merged
merged 2 commits into from Jul 8, 2022

Conversation

fredoh9
Copy link
Contributor

@fredoh9 fredoh9 commented Jun 1, 2022

No functionality change. Minor clean up.

Signed-off-by: Fred Oh fred.oh@linux.intel.com

Plan to add HASH loggings for each repo before deleting them.

@fredoh9 fredoh9 changed the title [Draft] docker: change indentation and add HOME variable [Draft] [SKIP CI] docker: change indentation and add HOME variable Jun 1, 2022
@fredoh9 fredoh9 changed the title [Draft] [SKIP CI] docker: change indentation and add HOME variable [SKIP CI] docker: change indentation and add HOME variable Jun 6, 2022
@fredoh9 fredoh9 marked this pull request as ready for review June 6, 2022 05:29
@fredoh9 fredoh9 requested a review from marc-hb June 6, 2022 05:35
@fredoh9 fredoh9 changed the title [SKIP CI] docker: change indentation and add HOME variable [SKIP CI] docker: log git hashes for each projects Jun 6, 2022
Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fredoh9 @marc-hb this looks like we are fixing integration with docker and also for v2.2 ?

@fredoh9
Copy link
Contributor Author

fredoh9 commented Jun 6, 2022

There was some build error due to wrong path. I will fix it (and see the image) and push my patch again.

+Step 32/35 : RUN cd "$HOME" &&         echo "Build date: $(date +%Y%m%d)" > "$HASH_LIST" &&    cd alsa-lib && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" &&     cd alsa-utils && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" &&   cd xtensa-overlay && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" &&       cd crosstool-ng && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" &&         cd newlib-xtensa && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" &&        rm -rf xtensa-overlay crosstool-ng newlib-xtensa &&     echo "Stage4: hash logging and deleting repos are done!"
+ ---> Running in fc79dd90b23d
+/bin/sh: 1: cd: can't cd to alsa-lib
+fatal: not a git repository (or any of the parent directories): .git
+fatal: not a git repository (or any of the parent directories): .git
+fatal: not a git repository (or any of the parent directories): .git
+fatal: not a git repository (or any of the parent directories): .git
+fatal: not a git repository (or any of the parent directories): .git
+The command '/bin/sh -c cd "$HOME" &&  echo "Build date: $(date +%Y%m%d)" > "$HASH_LIST" &&    cd alsa-lib && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" &&     cd alsa-utils && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" &&   cd xtensa-overlay && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" &&       cd crosstool-ng && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" &&         cd newlib-xtensa && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" &&        rm -rf xtensa-overlay crosstool-ng newlib-xtensa &&     echo "Stage4: hash logging and deleting repos are done!"' returned a non-zero code: 128

cd "$HOME"/crosstool-ng && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" && \
cd "$HOME"/newlib-xtensa && pwd >> "$HASH_LIST"; git log --oneline -5 >> "$HASH_LIST" && \
cd "$HOME" && rm -rf xtensa-overlay crosstool-ng newlib-xtensa && \
echo "Stage4: hash logging and deleting repos are done!"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can make this a for loop:

set -e ; for i in "$SOF_WORK"/alsa/alsa-lib "$SOF_WORK"/alsa/alsa-utils ...; do cd "$i"; git log ... ; done >> "$HASH_LIST"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to keep "" around the variables but it is not expanding if I do so. shellcheck warning is valid but we know $HOME and $SOF_WORK do not have space in it. I think better than all hard-coded path.

ARG REPOS="/home/sof/work/alsa/alsa-lib /home/sof/work/alsa/alsa-utils /home/sof/xtensa-overlay /home/sof/crosstool-ng /home/sof/newlib-xtensa"

@fredoh9
Copy link
Contributor Author

fredoh9 commented Jun 7, 2022

@fredoh9 @marc-hb this looks like we are fixing integration with docker and also for v2.2 ?

This isn't the fix particular for v.2.2 release. There was a bug in alsa-utils for IPC4. And doing some clean ups delayed long time. The other PR is for adding AMD rmb toolchain.

@lgirdwood
Copy link
Member

@fredoh9 ping

@fredoh9
Copy link
Contributor Author

fredoh9 commented Jul 7, 2022

I will update this today

No functionality change. Add some logs and minor clean up.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
To track the docker images, need to keep all the hashes of the projects
builts in the image. Log git tree information to
/home/sof/work/sof_git_hash.txt in the docker image.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved assuming this was actually tested (I know testing this takes ages :-)

@lgirdwood lgirdwood merged commit 9fc3833 into thesofproject:main Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants