Closed mkpankov closed 5 years ago
On a side note: why failing command doesn't cause the !Sh step to fail on first command? It returns 1 in case of error as it should.
You can add the false
command into !Sh
-script and make sure that the script is interrupted on it.
In the log above, these
+ echo debconf starterkit-001/eula select true
+ debconf-set-selections
+ echo debconf starterkit-001/eula seen true
+ debconf-set-selections
look like successful commands, and
+ DEBIAN_FRONTEND=noninteractive dpkg -i /work/.vagga-ws/StarterKit_1.0_amd64.deb
looks like the only failed one.
But the message about an error in the end quotes the !Sh
script entirely.
Try to execute your commands manually in the shell with such configuration
containers:
c1:
setup:
- !Ubuntu trusty
- !CacheDirs
/var/cache/debconf: debconf
commands:
bash: !Command
container: c1
run: bash
volumes:
/var/cache/debconf: !CacheDir "debconf"
@alexander-irbis I tried your suggested command, output is this:
root@mkpankov-OptiPlex-9020:/work/test_suites# echo debconf starterkit-001/eula select true | debconf-set-selections
root@mkpankov-OptiPlex-9020:/work/test_suites# echo debconf starterkit-001/eula seen true | debconf-set-selections
root@mkpankov-OptiPlex-9020:/work/test_suites# DEBIAN_FRONTEND=noninteractive dpkg -i /work/.vagga-ws/StarterKit_1.0_amd64.deb
dpkg: error: unable to access dpkg status area: Read-only file system
root@mkpankov-OptiPlex-9020:/work/test_suites# dpkg -i /work/.vagga-ws/StarterKit_1.0_amd64.deb
dpkg: error: unable to access dpkg status area: Read-only file system
Okay so the initial problem is on my side. I have several packages with similar ids and somehow I confused which one is installed so I had incorrect ids for debconf
. Correct ones were starterkit/eula
.
Sorry for bothering everyone, totally my issue.
I have following container:
This EULA and DEBIAN_FRONTEND magic is tested and works in our CI currently.
When I build this container in vagga, I get:
And when I enter shell manually and retry the commands I get this:
I tried various configurations of RW volumes set up to mount to /var/cache/debconf/, but none of them worked.
How do I do this?
On a side note: why failing command doesn't cause the
!Sh
step to fail on first command? It returns1
in case of error as it should.