@@ -101,19 +101,24 @@ if args.arch_tag:
101
101
# every time we want to poll.
102
102
# TODO: Remove --from
103
103
digestfile = "tmp/oscontainer-digest"
104
- # We need to pass the auth file from the unpriv user to the root process
105
- cosa_argv = ['sudo' , '--preserve-env=container,DISABLE_TLS_VERIFICATION,SSL_CERT_DIR,SSL_CERT_FILE,REGISTRY_AUTH_FILE,OSCONTAINER_CERT_DIR' ]
106
- authfile = os .environ .get ("REGISTRY_AUTH_FILE" , os .path .expanduser ('~/.docker/config.json' ))
107
- if not os .path .isfile (authfile ):
108
- raise SystemExit (f"Missing { authfile } " )
109
- os .environ ['REGISTRY_AUTH_FILE' ] = authfile
110
- cosa_argv .extend (['/usr/lib/coreos-assembler/oscontainer.py' , '--workdir=./tmp' , 'build' , f"--from={ args .from_image } " ])
104
+ print ("Entering vm to build oscontainer for build: {}" .format (latest_build ))
105
+ arguments = ''
111
106
for d in args .add_directory :
112
- cosa_argv . append ( f" --add-directory={ d } " )
113
- cosa_argv . append ( f" --display-name={ display_name } " )
107
+ arguments = arguments + ( f' --add-directory=" { d } "' )
108
+ arguments = arguments + ( f' --display-name=" { display_name } "' )
114
109
if 'labeled-packages' in configyaml :
115
110
pkgs = ' ' .join (configyaml ['labeled-packages' ])
116
- cosa_argv .append (f"--labeled-packages={ pkgs } " )
111
+ arguments = arguments + (f' --labeled-packages="{ pkgs } "' )
112
+ if args .format is not None :
113
+ arguments = arguments + (f' --format="{ args .format } "' )
114
+
115
+ cosa_argv = (['/usr/lib/coreos-assembler/build-legacy-oscontainer.sh' , '--workdir=./tmp' , 'build' , f'--from={ args .from_image } ' ])
116
+ for d in args .add_directory :
117
+ cosa_argv .append (f'--add-directory="{ d } "' )
118
+ cosa_argv .append (f'--display-name="{ display_name } "' )
119
+ if 'labeled-packages' in configyaml :
120
+ pkgs = ' ' .join (configyaml ['labeled-packages' ])
121
+ cosa_argv .append (f'--labeled-packages="{ pkgs } "' )
117
122
if args .format is not None :
118
123
cosa_argv .append (f'--format={ args .format } ' )
119
124
subprocess .check_call (cosa_argv +
0 commit comments