Skip to content

Conversation

@dcermak
Copy link
Collaborator

@dcermak dcermak commented Apr 24, 2024

No description provided.

dcermak added a commit that referenced this pull request Apr 24, 2024
dirkmueller
dirkmueller previously approved these changes Apr 25, 2024
Copy link
Member

@dirkmueller dirkmueller left a comment

Choose a reason for hiding this comment

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

I like it. tumbleweed rules!

@dmach
Copy link

dmach commented Apr 26, 2024

The container image looks relatively good, but still needs couple changes work nicely:

  • Unset OSC_APIURL otherwise it's not going to work with any other apiurl.
  • Install packages: openssh-common openssh-clients
  • Maybe also install git
  • Update Containerfile with WORKDIR /root/osc-workdir
  • drop the current entry point? maybe replace it with printing instructions how to use the container

The following command that works for me nicely:

podman run --rm -it \
    -v ~/.config/osc/oscrc:/root/.config/osc/oscrc:ro,Z \
    -v ~/.local/state/osc/cookiejar:/root/.local/state/osc/cookiejar:rw,Z \
    -v /etc/ssl/ca-bundle.pem:/etc/ssl/ca-bundle.pem:ro,Z \
    -v $SSH_AUTH_SOCK:/run/user/0/ssh-agent.socket:rw,Z \
    -e SSH_AUTH_SOCK=/var/run/user/0/ssh-agent.socket:rw,Z \
    -v "$PWD":/root/osc-workdir:rw,Z \
    osc:latest "$@"

The containers shares the following with the host: oscrc, cookiejar, ca certificates, ssh-agent socket and working dir (essential for checkout and other commands; will not work if a command expects project in parent directory, but that's not a common use case, I think)

dcermak added a commit that referenced this pull request Apr 26, 2024
dcermak added a commit that referenced this pull request Apr 26, 2024
dcermak added a commit that referenced this pull request Apr 26, 2024
dcermak added a commit that referenced this pull request Apr 27, 2024
dcermak added a commit that referenced this pull request Apr 29, 2024
dcermak added a commit that referenced this pull request Apr 29, 2024
dcermak added a commit that referenced this pull request Apr 29, 2024
dcermak added a commit that referenced this pull request May 6, 2024
dcermak added a commit that referenced this pull request May 6, 2024
dcermak added a commit that referenced this pull request May 6, 2024
dcermak added a commit that referenced this pull request May 15, 2024
dcermak added a commit that referenced this pull request May 15, 2024
dcermak added a commit that referenced this pull request May 15, 2024
dcermak added a commit that referenced this pull request May 15, 2024
dcermak pushed a commit that referenced this pull request Sep 11, 2024
dcermak pushed a commit that referenced this pull request Sep 11, 2024
dcermak pushed a commit that referenced this pull request Sep 11, 2024
fi

if [[ "-h --help -v --verbose -q --quiet --debug --debugger --post-mortem --traceback -H --http-debug --http-full-debug -A --apiurl --config --setopt --no-keyring add addchannels addcontainers addremove ar aggregatepac api branch getpac bco branchco browse build wipe shell chroot buildconfig buildhistory buildhist buildinfo buildlog buildlogtail blt bl cat less blame changedevelrequest changedevelreq cr checkconstraints checkout co clean cleanassets ca clone comment commit checkin ci config copypac create-pbuild-config cpc createincident createrequest creq delete remove del rm deleterequest deletereq droprequest dropreq dr dependson detachbranch develproject dp bsdevelproject diff di ldiff linkdiff distributions dists downloadassets da enablechannels enablechannel fork getbinaries help importsrcpkg info init jobhistory jobhist linkpac linktobranch list LL lL ll ls localbuildlog lbl lock log maintainer bugowner maintenancerequest mr mbranch maintained sm meta mkpac mv my patchinfo pdiff prdiff projdiff projectdiff prjresults pr pull pull_request rdelete rdiff rebuild rebuildpac release releaserequest remotebuildlog remotebuildlogtail rbuildlogtail rblt rbuildlog rbl repairlink repairwc repo repositories platforms repos repourls request review rq requestmaintainership reqbs reqms reqmaintainership requestbugownership reqbugownership resolved restartbuild abortbuild results r revert rpmlintlog lint rpmlint rremove search bse se sendsysrq service setdevelproject sdp setlinkrev showlinked signkey staging status st submitrequest submitpac submitreq sr token triggerreason tr undelete unlock update up updatepacmetafromspec updatepkgmetafromspec metafromspec vc version whatdependson whois user who wipebinaries unpublish workerinfo" =~ (^|[[:space:]])$1($|[[:space:]]) ]]; then
# looks like the user is executing the container as the osc command
Copy link
Member

Choose a reason for hiding this comment

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

It looks like, but it can be misleading.

What if I want to cat or ls a file inside the container?
It will assume it is an osc command, instead of calling regular binaries in the PATH.

I can start a regular shell session and execute binaries, that is an easy solution, or perhaps use /bin/ls or similar to invoke the binary directly.

dcermak pushed a commit that referenced this pull request Sep 12, 2024
@dcermak
Copy link
Collaborator Author

dcermak commented Sep 12, 2024

WIP tests PR: SUSE/BCI-tests#593

dcermak pushed a commit that referenced this pull request Nov 4, 2024
dcermak pushed a commit that referenced this pull request Nov 4, 2024
dcermak pushed a commit that referenced this pull request Nov 4, 2024
dcermak pushed a commit that referenced this pull request Mar 26, 2025
dcermak pushed a commit that referenced this pull request Mar 26, 2025
dcermak pushed a commit that referenced this pull request Mar 26, 2025
@SUSE SUSE deleted a comment from github-actions bot Jun 11, 2025
@SUSE SUSE deleted a comment from github-actions bot Jun 11, 2025
@SUSE SUSE deleted a comment from github-actions bot Jun 11, 2025
bci-pushman pushed a commit that referenced this pull request Jun 11, 2025
bci-pushman pushed a commit that referenced this pull request Jun 11, 2025
bci-pushman pushed a commit that referenced this pull request Jun 11, 2025
Co-authored-by: Dmitri Popov <[email protected]>
Co-authored-by: Daniel Mach <[email protected]>
@github-actions
Copy link

Created a staging project on OBS for Tumbleweed: home:pushman:BCI:Staging:Tumbleweed:Tumbleweed-1050
Changes pushed to branch Tumbleweed-1050 as commit d82415270c3d4743f1ce472989b2f7c56bd68f39

@github-actions
Copy link

Created a staging project on OBS for 6: home:pushman:BCI:Staging:SLE-15-SP6:6-1050
Changes pushed to branch 6-1050 as commit 6ee8e911ff5b32804adabf1dff01aac2ab6dd944

@github-actions
Copy link

Created a staging project on OBS for 7: home:pushman:BCI:Staging:SLE-15-SP7:7-1050
Changes pushed to branch 7-1050 as commit cbd7a5e8e1b674c37e4699d1e409b6c79b19d1ff

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.

6 participants