File vendorit-gitlab of Package container-vendor-gitlab-js
#!/usr/bin/bash TARGET="$PWD/gitlab" mkdir -p $TARGET/ echo "Copy input files to work directory" cd /work/gitlab/ rsync -a $PWD/ $TARGET/ cd $TARGET echo "Running yarn" if yarn install --pure-lockfile --ignore-engines --cache-folder=$PWD/tmp/cache/ ; then echo "Cleaning up *.node files" # find -name \*.node -print -delete ; find -name \*.node -path '*obj.target*' -delete -ls echo "Compressing files" pushd workhorse go mod vendor popd ls /work/ bsdtar --option xz:threads=16 -cJf /work/gitlab-js-stuff.tar.xz node_modules workhorse/go.mod workhorse/go.sum workhorse/vendor/ ; else echo "yarn failed" ; exit 1 fi