init commit for coverting to podman

This commit is contained in:
zerodoctor
2023-10-04 23:19:30 -05:00
parent 7e9969423c
commit 04332e5527
96 changed files with 2034 additions and 534 deletions

View File

@@ -10,7 +10,7 @@ import (
"path/filepath"
"strings"
"github.com/drone-runners/drone-runner-docker/engine/resource"
"github.com/drone-runners/drone-runner-podman/engine/resource"
"github.com/drone/drone-go/drone"
"github.com/drone/runner-go/manifest"
)
@@ -130,7 +130,7 @@ func checkStep(step *resource.Step, trusted bool) error {
}
for _, mount := range step.Volumes {
switch mount.Name {
case "workspace", "_workspace", "_docker_socket":
case "workspace", "_workspace", "_podman_socket":
return fmt.Errorf("linter: invalid volume name: %s", mount.Name)
}
if strings.HasPrefix(filepath.Clean(mount.MountPath), "/run/drone") {
@@ -157,7 +157,7 @@ func checkVolumes(pipeline *resource.Pipeline, trusted bool) error {
switch volume.Name {
case "":
return fmt.Errorf("linter: missing volume name")
case "workspace", "_workspace", "_docker_socket":
case "workspace", "_workspace", "_podman_socket":
return fmt.Errorf("linter: invalid volume name: %s", volume.Name)
}
}

View File

@@ -8,7 +8,7 @@ import (
"path"
"testing"
"github.com/drone-runners/drone-runner-docker/engine/resource"
"github.com/drone-runners/drone-runner-podman/engine/resource"
"github.com/drone/drone-go/drone"
"github.com/drone/runner-go/manifest"
)
@@ -47,7 +47,7 @@ func TestLint(t *testing.T) {
path: "testdata/pipeline_volume_invalid_name.yml",
trusted: false,
invalid: true,
message: "linter: invalid volume name: _docker_socket",
message: "linter: invalid volume name: _podman_socket",
},
// user should not be trying to mount internal or restricted
// volume paths.

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: default
steps:
@@ -21,4 +21,4 @@ steps:
- go build
- go test
...
...

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: default
steps:
@@ -14,4 +14,4 @@ steps:
image: golang
commands:
- go build
- go test
- go test

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: default
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
platform:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
platform:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: default
steps:
@@ -15,4 +15,4 @@ steps:
- go build
- go test
depends_on:
- foo
- foo

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,14 +1,14 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:
- name: test
image: docker
image: podman
volumes:
- name: _docker_socket
path: /var/run/docker.sock
- name: _podman_socket
path: /run/podman/podman.sock
commands:
- docker system prune
- podman system prune

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: amd64
steps:
@@ -36,4 +36,4 @@ steps:
depends_on:
- amd64
...
...

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:

View File

@@ -1,6 +1,6 @@
---
kind: pipeline
type: docker
type: podman
name: linux
steps:
@@ -15,4 +15,4 @@ steps:
volumes:
- name: vol
temp: {}
temp: {}