I need to execute some shell commands on build success, but I need to do it in the same docker container, is it possible? From the documentation I see that it is possible only in separate docker container.
the commands are executed with
-e which means if a single command fails the build exits immediately. So if you want to execute commands in the same container, after the other commands have succeeded, just append to the end of the commands list:
pipeline: build: image: golang commands: - go build - go test # this below command will not execute unless the above commands # are successful, e.g. return a non-zero exit code - ./done.sh
Oh, it’s so simple, thank You