apiVersion: argoproj.io/v1alpha1 kind: Workflow metadata: generateName: oas-image- spec: arguments: parameters: - name: repo value: ssh://git@git.cestong.com.cn:8162/cecf/ob-agent-stream.git - name: branch value: master - name: path value: test/e2e/images/argosay/v2 - name: image value: reg.cestong.com.cn/cecf/ob-agent-stream:test entrypoint: main volumeClaimTemplates: - metadata: name: work spec: accessModes: [ "ReadWriteOnce" ] resources: requests: storage: 64Mi templates: - name: main dag: tasks: - name: clone template: clone arguments: parameters: - name: repo value: "{{workflow.parameters.repo}}" - name: branch value: "{{workflow.parameters.branch}}" - name: build template: build arguments: parameters: - name: path value: "{{workflow.parameters.path}}" depends: "clone" - name: image template: image arguments: parameters: - name: path value: "{{workflow.parameters.path}}" - name: image value: "{{workflow.parameters.image}}" depends: "build" - name: clone inputs: parameters: - name: repo - name: branch container: volumeMounts: - mountPath: /work name: work image: reg.cestong.com.cn/cecf/cibuilder workingDir: /work args: - clone - --depth - "1" - --branch - "{{inputs.parameters.branch}}" - --single-branch - "{{inputs.parameters.repo}}" - . - name: build inputs: parameters: - name: path container: image: reg.cestong.com.cn/cecf/cibuilder volumeMounts: - mountPath: /work name: work workingDir: /work/{{inputs.parameters.path}} env: # Because this is not a Gomodule, we must turn modules off. - name: GO111MODULE value: "on" command: - go args: - build - -v - -o - argosay - ./... - name: image inputs: parameters: - name: path - name: image volumes: - name: docker-config secret: secretName: docker-config container: readinessProbe: exec: command: [ sh, -c, "buildctl debug workers" ] image: reg.cestong.com.cn/cecf/cibuilder volumeMounts: - name: work mountPath: /work #- name: docker-config # mountPath: /.docker workingDir: /work/{{inputs.parameters.path}} env: - name: BUILDKITD_FLAGS value: --oci-worker-no-process-sandbox #- name: DOCKER_CONFIG # value: /.docker command: - buildctl-daemonless.sh args: - build - --frontend - dockerfile.v0 - --local - context=. - --local - dockerfile=. - --output - type=image,name={{inputs.parameters.image}},push=true