feat(buildtrigger): allow use to specify dockerfile
users can only specify the folder and the dockerfile must be names "Dockerfile" this allows users to specify the file and it can be called "Dockerfile" or <some name>.Dockerfile
This commit is contained in:
parent
aa2f88d321
commit
e30cd931d1
12 changed files with 50 additions and 42 deletions
|
@ -1,4 +1,5 @@
|
|||
import datetime
|
||||
import os
|
||||
import time
|
||||
import logging
|
||||
import json
|
||||
|
@ -122,9 +123,13 @@ class BuildComponent(BaseComponent):
|
|||
# base_image: The image name and credentials to use to conduct the base image pull.
|
||||
# username: The username for pulling the base image (if any).
|
||||
# password: The password for pulling the base image (if any).
|
||||
|
||||
subdir, dockerfile_name = os.path.split(build_config.get('build_subdir', '/Dockerfile'))
|
||||
|
||||
build_arguments = {
|
||||
'build_package': build_job.get_build_package_url(self.user_files),
|
||||
'sub_directory': build_config.get('build_subdir', ''),
|
||||
'sub_directory': subdir,
|
||||
'dockerfile_name': dockerfile_name,
|
||||
'repository': repository_name,
|
||||
'registry': self.registry_hostname,
|
||||
'pull_token': build_job.repo_build.access_token.code,
|
||||
|
|
Reference in a new issue