diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fa0ee0f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM golang:latest +WORKDIR /the/workdir/path \ No newline at end of file diff --git a/argo-workflows/example-ci-workflow.yaml b/argo-workflows/example-ci-workflow.yaml index d4ed90c..2aa3ad8 100644 --- a/argo-workflows/example-ci-workflow.yaml +++ b/argo-workflows/example-ci-workflow.yaml @@ -11,22 +11,27 @@ metadata: spec: entrypoint: ci serviceAccountName: admin - volumes: - - name: shared-data - emptyDir: {} + volumeClaimTemplates: + - metadata: + name: shared-data + spec: + accessModes: ["ReadWriteOnce"] + resources: + requests: + storage: 1Gi templates: - name: ci dag: tasks: - name: git-clone - template: git clone + template: git-clone arguments: parameters: [{name: message, value: "git-clone task completed"}] - name: ls template: ls dependencies: [git-clone] - name: build - template: simple-container + template: build arguments: parameters: [{name: message, value: "build task completed"}] dependencies: [unit-tests, lint-scan] @@ -73,4 +78,29 @@ spec: args: [ls /] - name: git-clone + container: + image: ubuntu:latest + command: [sh, -c] + args: + - | + apt update + apt install -y git + GIT_SSL_NO_VERIFY=true git clone -b main https://gitea.cnoe.localtest.me/giteaAdmin/fibonacci_go.git /shared-data/repo + ls -la / + ls -la /shared-data + volumeMounts: + - name: shared-data + mountPath: /shared-data + + - name: build + container: + image: ubuntu:latest + command: [sh, -c] + args: + - | + ls -la / + ls -la /shared-data + volumeMounts: + - name: shared-data + mountPath: /shared-data \ No newline at end of file