Skip to content

Commit a5c5c44

Browse files
authored
chore(cdi): restore patching after go mod vendor (#1062)
- We have patch on json-patch/v5 in vendor directory. Executing go mod vendor after patching in vendor directory revert such patches. Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
1 parent 1262756 commit a5c5c44

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

images/cdi-artifact/werf.inc.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,9 @@ shell:
3737
git config --global --add advice.detachedHead false
3838
git clone --depth 1 --branch v{{ $version }} $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} /containerized-data-importer
3939
40-
- |
41-
cd /containerized-data-importer
42-
for p in /patches/*.patch ; do
43-
echo -n "Apply ${p} ... "
44-
git apply --ignore-space-change --ignore-whitespace ${p} && echo OK || (echo FAIL ; exit 1)
45-
done
46-
4740
- |
4841
echo Download Go modules.
42+
cd /containerized-data-importer
4943
go mod download
5044
5145
echo Update modules to mitigate CVEs...
@@ -61,6 +55,15 @@ shell:
6155
go mod tidy
6256
go mod vendor
6357
58+
- |
59+
# IMPORTANT!
60+
# Apply patches after go mod vendor, as there are patches on modules in vendor directory.
61+
cd /containerized-data-importer
62+
for p in /patches/*.patch ; do
63+
echo -n "Apply ${p} ... "
64+
git apply --ignore-space-change --ignore-whitespace ${p} && echo OK || (echo FAIL ; exit 1)
65+
done
66+
6467
setup:
6568
- mkdir /cdi-binaries
6669
- cd /containerized-data-importer

0 commit comments

Comments
 (0)