version: 2 name: 基于gitlink构建 description: "" global: concurrent: 1 cache: - GOCACHE - GOMODCACHE workflow: - ref: start name: 开始 task: start - ref: git_clone_0 name: storage_clone task: git_clone@1.2.9 input: username: ((gitlink.user)) password: ((gitlink.password)) remote_url: '"https://gitlink.org.cn/JointCloud/storage.git"' ref: '"refs/heads/master"' commit_id: '""' depth: 1 needs: - start - ref: docker_image_build_2 name: scanner镜像构建 cache: GOCACHE: /root/.cache/go-build GOMODCACHE: /go/pkg/mod task: docker_image_build@1.6.0 input: docker_username: ((docker_registry.registry_user)) docker_password: ((docker_registry.registry_password)) image_name: '"112.95.163.90:5010/scannerservice-x86"' image_tag: '"latest"' registry_address: '"123.60.146.162:5010"' docker_file: '"Dockerfile"' docker_build_path: '"."' workspace: git_clone_0.git_path image_push: true build_args: '"TARGET=scannerimage"' needs: - shell_0 - ref: docker_image_build_1 name: coor镜像构建 cache: GOCACHE: /root/.cache/go-build GOMODCACHE: /go/pkg/mod task: docker_image_build@1.6.0 input: docker_username: ((docker_registry.registry_user)) docker_password: ((docker_registry.registry_password)) image_name: '"112.95.163.90:5010/coordinatorservice-x86"' image_tag: '"latest"' registry_address: '"123.60.146.162:5010"' docker_file: '"Dockerfile"' docker_build_path: '"."' workspace: git_clone_0.git_path image_push: true build_args: '"TARGET=coorimage"' needs: - shell_0 - ref: docker_image_build_3 name: client镜像构建 cache: GOCACHE: /root/.cache/go-build GOMODCACHE: /go/pkg/mod task: docker_image_build@1.6.0 input: docker_username: ((docker_registry.registry_user)) docker_password: ((docker_registry.registry_password)) image_name: '"112.95.163.90:5010/clientservice-x86"' image_tag: '"latest"' registry_address: '"123.60.146.162:5010"' docker_file: '"Dockerfile"' docker_build_path: '"."' workspace: git_clone_0.git_path image_push: true build_args: '"TARGET=clientimage"' needs: - shell_0 - ref: ssh_cmd_0 name: ssh执行命令 task: ssh_cmd@1.1.1 input: ssh_private_key: ((SSH.pcm1)) ssh_ip: '"123.60.146.162"' ssh_port: '"22"' ssh_user: '"pcm"' ssh_cmd: '"cd /home/pcm/deploy/cloudream/workspace/storage_yml&&ls"' needs: - docker_image_build_2 - docker_image_build_0 - docker_image_build_1 - docker_image_build_3 - ref: end name: 结束 task: end needs: - ssh_cmd_0 - dockerBuild_0 - ref: docker_image_build_0 name: hub镜像构建 cache: GOCACHE: /root/.cache/go-build GOMODCACHE: /go/pkg/mod task: docker_image_build@1.6.0 input: docker_username: ((docker_registry.registry_user)) docker_password: ((docker_registry.registry_password)) image_name: '"112.95.163.90:5010/hubservice-x86"' image_tag: '"latest"' registry_address: '"123.60.146.162:5010"' docker_file: '"Dockerfile"' docker_build_path: '"."' workspace: git_clone_0.git_path image_push: true build_args: '"TARGET=hubimage"' needs: - shell_0 - ref: git_clone_1 name: common_clone task: git_clone@1.2.9 input: username: ((gitlink.user)) password: ((gitlink.password)) remote_url: '"https://gitlink.org.cn/JointCloud/common.git"' ref: '"refs/heads/master"' commit_id: '""' depth: 1 needs: - start - ref: shell_0 name: shell image: docker.jianmuhub.com/library/alpine:3.17.0 script: - "ls " needs: - git_clone_0 - git_clone_1 - ref: dockerBuild_0 name: Docker镜像构建(kaylee) task: kaylee/dockerBuild@1.0.0 input: context: git_clone_0.git_path dockerfile: '"Dockerfile"' docker_build_tags: '"latest"' docker_build_args: '"TARGET=hubimage"' docker_login_registry: '""' docker_login_username: ((docker_registry.registry_user)) docker_login_password: ((docker_registry.registry_password)) docker_run_image: '""' docker_run_name: '""' docker_run_network: '""' docker_run_volumes: '""' needs: - shell_0