|
3 | 3 |
|
4 | 4 | ''' |
5 | 5 |
|
6 | | -import fluid |
| 6 | +import fluid as couler |
7 | 7 |
|
8 | 8 |
|
9 | | -@fluid.task |
| 9 | +@couler.task |
10 | 10 | def build_docker_image_from_git_source( |
11 | 11 | docker_source: "input,git", |
12 | 12 | built_image: "output,image", |
13 | 13 | path_to_dockerfile="/workspace/docker-source/Dockerfile", |
14 | 14 | path_to_context="/workspace/docker-source"): |
15 | 15 | '''Define a Tekton Task that builds a Docker image from a Git repo''' |
16 | | - fluid.step(image="gcr.io/kaniko-project/executor:v0.14.0", |
| 16 | + couler.step(image="gcr.io/kaniko-project/executor:v0.14.0", |
17 | 17 | cmd=["/kaniko/executor"], |
18 | 18 | args=[f"--dockerfile={path_to_dockerfile}", |
19 | 19 | f"--destination={built_image.url}", |
20 | 20 | f"--context={path_to_context}"], |
21 | 21 | env={"DOCKER_CONFIG": "/tekton/home/.docker/"}) |
22 | 22 |
|
23 | 23 |
|
24 | | -SKAFFOLD_GIT = fluid.git_resource( |
| 24 | +SKAFFOLD_GIT = couler.git_resource( |
25 | 25 | url="https://github.com/GoogleContainerTools/skaffold", |
26 | 26 | revision="master") |
27 | 27 |
|
28 | | -SKAFFOLD_IMAGE_LEEROY_WEB = fluid.image_resource( |
| 28 | +SKAFFOLD_IMAGE_LEEROY_WEB = couler.image_resource( |
29 | 29 | url="dockerhub.com/cxwangyi/leeroy-web") |
30 | 30 |
|
31 | 31 |
|
32 | | -with fluid.Secret(fluid.service_account("regcred")): |
| 32 | +with couler.Secret(couler.service_account("regcred")): |
33 | 33 | build_docker_image_from_git_source( |
34 | 34 | SKAFFOLD_GIT, |
35 | 35 | SKAFFOLD_IMAGE_LEEROY_WEB, |
|
0 commit comments