Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/job/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The job type docker is one of the most important jobs. You can use it to run any
"command": ["echo", "hello world"],
"resources": { "limits": { "cpu": 1, "memory": 1024 } },
"build_only": false,
"enable_docker_build_kit": true,
"enable_docker_buildkit": true,
"build_context": "...",
"cache": { ... },
"timeout": 3600,
Expand All @@ -35,7 +35,7 @@ The job type docker is one of the most important jobs. You can use it to run any
|command|false|string||The command in [exec form](https://docs.docker.com/engine/reference/builder/#cmd) to be used when the container is run. Ignored if `build_only=true`|
|resources|true|[Resource Configuration](/docs/job/resources.md)||Specify the required resources for your job.|
|build_only|true|boolean|true|If set to true the container will only be build but not run. Use it if you only want to build a container and push it to a registry. See here for how to push to a docker registry.|
|enable_docker_build_kit|false|boolean|false|If set to true, InfraBox will try to use the Dokcer Buildkit to build the containers. For more details, please refer to [Docker docs](https://docs.docker.com/develop/develop-images/build_enhancements/)|
|enable_docker_buildkit|false|boolean|false|If set to true, InfraBox will try to use the Dokcer Buildkit to build the containers. For more details, please refer to [Docker docs](https://docs.docker.com/develop/develop-images/build_enhancements/)|
|build_context|false|string||Specify the docker build context. If not set the directory containing the `infrabox.json` file will be used.|
|cache|false|[Cache Configuration](/docs/job/cache.md)|{}|Configure the caching behavior|
|timeout|false|integer|3600|Timeout in seconds after which the job should be killed. Timeout starts when the job is set to running|
Expand Down
4 changes: 2 additions & 2 deletions docs/job/docker_compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Sometimes you want to start multiple containers to test your application. For th
"jobs": [{
"type": "docker-compose",
"name": "test",
"enable_docker_build_kit": true,
"enable_docker_buildkit": true,
"docker_compose_file": "infrabox/test/docker-compose.yml",
"resources": { "limits": { "cpu": 1, "memory": 1024 } },
"cache": { ... },
Expand All @@ -22,7 +22,7 @@ Sometimes you want to start multiple containers to test your application. For th
|------|----------|------|---------|-------------|
|type|true|string||Has to be "docker-compose" to run multiple containers|
|name|true|string||Name of the job|
|enable_docker_build_kit|false|boolean|false|If set to true, InfraBox will try to use the Dokcer Buildkit to build the containers. For more details, please refer to [Docker docs](https://docs.docker.com/compose/reference/build/)|
|enable_docker_buildkit|false|boolean|false|If set to true, InfraBox will try to use the Dokcer Buildkit to build the containers. For more details, please refer to [Docker docs](https://docs.docker.com/compose/reference/build/)|
|docker_compose_file|true|string||Path to the `docker-compose.yml`|
|resources|true|[Resource Configuration](/docs/job/resources.md)||Specify the required resources for your job|
|cache|false|[Cache Configuration](/docs/job/cache.md)|{}|Configure the caching behavior|
Expand Down
4 changes: 2 additions & 2 deletions src/job/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ def run_job_docker_compose(self, c):
self.environment['PATH'] = os.environ['PATH']
self.environment['DOCKER_BUILDKIT'] = '0'
self.environment['COMPOSE_DOCKER_CLI_BUILD'] = '0'
if self.job['definition'].get('enable_docker_build_kit', False) is True:
if self.job['definition'].get('enable_docker_buildkit', False) is True:
c.collect('BUILDKIT is enabled during build!', show=True)
self.environment['DOCKER_BUILDKIT'] = '1'
self.environment['COMPOSE_DOCKER_CLI_BUILD']= '1'
Expand Down Expand Up @@ -1001,7 +1001,7 @@ def build_docker_image(self, image_name, cache_image, target=None):

cwd = self._get_build_context_current_job()

if self.job['definition'].get('enable_docker_build_kit', False) is True:
if self.job['definition'].get('enable_docker_buildkit', False) is True:
os.environ['DOCKER_BUILDKIT'] = '1'

c.execute_mask(cmd, cwd=cwd, show=True, mask=self.repository.get('github_api_token', None))
Expand Down
12 changes: 6 additions & 6 deletions src/pyinfrabox/infrabox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def parse_docker_image(d, path):

def parse_docker(d, path):
check_allowed_properties(d, path, ("type", "name", "docker_file", "depends_on", "resources",
"build_only", "environment", "target", "enable_docker_build_kit",
"build_only", "environment", "target", "enable_docker_buildkit",
"build_arguments", "deployments", "timeout", "security_context", "command",
"build_context", "cache", "repository", "cluster", "services", "registries"))
check_required_properties(d, path, ("type", "name", "docker_file", "resources"))
Expand All @@ -312,8 +312,8 @@ def parse_docker(d, path):
if 'build_only' in d:
check_boolean(d['build_only'], path + ".build_only")

if 'enable_docker_build_kit' in d:
check_boolean(d['enable_docker_build_kit'], path + ".enable_docker_build_kit" )
if 'enable_docker_buildkit' in d:
check_boolean(d['enable_docker_buildkit'], path + ".enable_docker_buildkit" )

if 'cache' in d:
parse_cache(d['cache'], path + ".cache")
Expand Down Expand Up @@ -347,7 +347,7 @@ def parse_docker(d, path):


def parse_docker_compose(d, path):
check_allowed_properties(d, path, ("type", "name", "docker_compose_file", "depends_on", "stop_timeout", "enable_docker_build_kit",
check_allowed_properties(d, path, ("type", "name", "docker_compose_file", "depends_on", "stop_timeout", "enable_docker_buildkit",
"compose_profiles", "environment", "resources", "cache", "timeout", "cluster",
"repository", "registries", "parallel_build"))
check_required_properties(d, path, ("type", "name", "docker_compose_file", "resources"))
Expand Down Expand Up @@ -378,8 +378,8 @@ def parse_docker_compose(d, path):
if 'registries' in d:
parse_registries(d['registries'], path + '.registries')

if 'enable_docker_build_kit' in d:
check_boolean(d['enable_docker_build_kit'], path + ".enable_docker_build_kit" )
if 'enable_docker_buildkit' in d:
check_boolean(d['enable_docker_buildkit'], path + ".enable_docker_buildkit" )


def parse_wait(d, path):
Expand Down