diff --git a/images/cdi-artifact/werf.inc.yaml b/images/cdi-artifact/werf.inc.yaml index 0542a85fe7..66bf8fa5ce 100644 --- a/images/cdi-artifact/werf.inc.yaml +++ b/images/cdi-artifact/werf.inc.yaml @@ -37,15 +37,9 @@ shell: git config --global --add advice.detachedHead false git clone --depth 1 --branch v{{ $version }} $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} /containerized-data-importer - - | - cd /containerized-data-importer - for p in /patches/*.patch ; do - echo -n "Apply ${p} ... " - git apply --ignore-space-change --ignore-whitespace ${p} && echo OK || (echo FAIL ; exit 1) - done - - | echo Download Go modules. + cd /containerized-data-importer go mod download echo Update modules to mitigate CVEs... @@ -61,6 +55,15 @@ shell: go mod tidy go mod vendor + - | + # IMPORTANT! + # Apply patches after go mod vendor, as there are patches on modules in vendor directory. + cd /containerized-data-importer + for p in /patches/*.patch ; do + echo -n "Apply ${p} ... " + git apply --ignore-space-change --ignore-whitespace ${p} && echo OK || (echo FAIL ; exit 1) + done + setup: - mkdir /cdi-binaries - cd /containerized-data-importer