@@ -14,6 +14,7 @@ import (
14
14
"github.com/werf/werf/v2/pkg/dockerfile"
15
15
"github.com/werf/werf/v2/pkg/dockerfile/frontend"
16
16
"github.com/werf/werf/v2/pkg/image"
17
+ "github.com/werf/werf/v2/pkg/ssh_agent"
17
18
"github.com/werf/werf/v2/pkg/werf/global_warnings"
18
19
)
19
20
@@ -113,7 +114,7 @@ func (s *ImageSpecStage) PrepareImage(ctx context.Context, _ Conveyor, _ contain
113
114
return nil
114
115
}
115
116
116
- const imageSpecStageCacheVersion = "1 "
117
+ const imageSpecStageCacheVersion = "2 "
117
118
118
119
func (s * ImageSpecStage ) GetDependencies (_ context.Context , _ Conveyor , _ container_backend.ContainerBackend , _ , _ * StageImage , _ container_backend.BuildContextArchiver ) (string , error ) {
119
120
var args []string
@@ -210,7 +211,7 @@ func modifyEnv(env, removeKeys []string, addKeysMap map[string]string) ([]string
210
211
delete (baseEnvMap , key )
211
212
}
212
213
213
- // FIXME: This is a temporary solution to remove werf labels that persist after build.
214
+ // FIXME: This is a temporary solution to remove werf commit envs that persist after build.
214
215
for _ , key := range []string {
215
216
"WERF_COMMIT_HASH" ,
216
217
"WERF_COMMIT_TIME_HUMAN" ,
@@ -219,6 +220,11 @@ func modifyEnv(env, removeKeys []string, addKeysMap map[string]string) ([]string
219
220
delete (baseEnvMap , key )
220
221
}
221
222
223
+ // FIXME: This is a temporary solution to remove werf SSH_AUTH_SOCK that persist after build.
224
+ if envValue , hasEnv := baseEnvMap [ssh_agent .SSHAuthSockEnv ]; hasEnv && envValue == container_backend .SSHContainerAuthSockPath {
225
+ delete (baseEnvMap , ssh_agent .SSHAuthSockEnv )
226
+ }
227
+
222
228
envMapToExpand := make (map [string ]string )
223
229
for key , value := range baseEnvMap {
224
230
envMapToExpand [key ] = value
0 commit comments