Actions
Issue #5078
closedIncluding a PR in a Travis build fails with 'pushd: not found'
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Plugin Template
Sprint:
Sprint 55
Quarter:
Description
Example: https://travis-ci.org/pulp/pulp_file/jobs/553829203#L505-L508
Error:
.travis/before_install.sh: 49: .travis/before_install.sh: pushd: not found
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
.travis/before_install.sh: 52: .travis/before_install.sh: popd: not found
We think the problem is that Travis is using Ubuntu which has dash and push/popd are bash extensions.
Actions
Improve before_install.sh
Use bash and the more secure
set -mveuo pipefail
(as in other scripts)Use shallow clones and shallow fetch to speed up the CI run (Especially pulpcore takes a long time to clone completely. We don't need any history when building in the CI.)
get rid of pushd/popd (bashism that is not needed here)
https://pulp.plan.io/issues/5078 fixes #5078