Move cncd/pipeline/pipeline/ to pipeline/ (#347)

* Refactor: move cncd/pipeline/ to pipeline/

* Refactor: move pipeline/pipeline/ to pipeline/
This commit is contained in:
Jacob Floyd
2021-09-24 06:18:34 -05:00
committed by GitHub
parent a0d008e071
commit e34daae0cf
114 changed files with 57 additions and 74 deletions

View File

@@ -0,0 +1,18 @@
Compile the yaml to the intermediate representation:
```
pipec compile
```
Execute the intermediate representation:
```
pipec exec
```
This example shows how to use the network_mode option to use the network defined
by other container. This is useful for example to allow the CI to connect with servers
behind a VPN.
Before to start you need to create a container that connects to the VPN (using one of
the openvpn client images like https://github.com/ekristen/docker-openvpn-client).

View File

@@ -0,0 +1,105 @@
{
"pipeline": [
{
"name": "pipeline_clone_0",
"alias": "git",
"steps": [
{
"name": "pipeline_clone_0",
"alias": "git",
"image": "plugins/git:latest",
"working_dir": "/go/src/github.com/drone/envsubst",
"environment": {
"CI": "drone",
"CI_SYSTEM": "pipec",
"CI_SYSTEM_ARCH": "linux/amd64",
"CI_SYSTEM_LINK": "https://github.com/cncd/pipec",
"CI_SYSTEM_NAME": "pipec",
"CI_WORKSPACE": "/go/src/github.com/drone/envsubst",
"DRONE": "true",
"DRONE_ARCH": "linux/amd64",
"DRONE_BUILD_LINK": "https://github.com/cncd/pipec//0",
"DRONE_REPO_SCM": "git",
"DRONE_WORKSPACE": "/go/src/github.com/drone/envsubst",
"PLUGIN_DEPTH": "50"
},
"volumes": [
"pipeline_default:/go"
],
"networks": [
{
"name": "pipeline_default",
"aliases": [
"git"
]
}
],
"on_success": true,
"auth_config": {}
}
]
},
{
"name": "pipeline_stage_0",
"alias": "build",
"steps": [
{
"name": "pipeline_step_0",
"alias": "build",
"image": "tutum/curl:latest",
"working_dir": "/go/src/github.com/drone/envsubst",
"environment": {
"CI": "drone",
"CI_SCRIPT": "CmlmIFsgLW4gIiRDSV9ORVRSQ19NQUNISU5FIiBdOyB0aGVuCmNhdCA8PEVPRiA+ICRIT01FLy5uZXRyYwptYWNoaW5lICRDSV9ORVRSQ19NQUNISU5FCmxvZ2luICRDSV9ORVRSQ19VU0VSTkFNRQpwYXNzd29yZCAkQ0lfTkVUUkNfUEFTU1dPUkQKRU9GCmNobW9kIDA2MDAgJEhPTUUvLm5ldHJjCmZpCnVuc2V0IENJX05FVFJDX1VTRVJOQU1FCnVuc2V0IENJX05FVFJDX1BBU1NXT1JECnVuc2V0IENJX1NDUklQVAp1bnNldCBEUk9ORV9ORVRSQ19VU0VSTkFNRQp1bnNldCBEUk9ORV9ORVRSQ19QQVNTV09SRAoKZWNobyArICJjdXJsIC1zIC1mIC1MIGh0dHA6Ly9IT1NUX09SX0lQLyIKY3VybCAtcyAtZiAtTCBodHRwOi8vSE9TVF9PUl9JUC8KCg==",
"CI_SYSTEM": "pipec",
"CI_SYSTEM_ARCH": "linux/amd64",
"CI_SYSTEM_LINK": "https://github.com/cncd/pipec",
"CI_SYSTEM_NAME": "pipec",
"CI_WORKSPACE": "/go/src/github.com/drone/envsubst",
"DRONE": "true",
"DRONE_ARCH": "linux/amd64",
"DRONE_BUILD_LINK": "https://github.com/cncd/pipec//0",
"DRONE_REPO_SCM": "git",
"DRONE_WORKSPACE": "/go/src/github.com/drone/envsubst",
"HOME": "/root",
"SHELL": "/bin/sh"
},
"entrypoint": [
"/bin/sh",
"-c"
],
"command": [
"echo $CI_SCRIPT | base64 -d | /bin/sh -e"
],
"volumes": [
"pipeline_default:/go"
],
"networks": [
{
"name": "pipeline_default",
"aliases": [
"build"
]
}
],
"on_success": true,
"auth_config": {},
"network_mode": "container:vpn"
}
]
}
],
"networks": [
{
"name": "pipeline_default",
"driver": "bridge"
}
],
"volumes": [
{
"name": "pipeline_default",
"driver": "local"
}
],
"secrets": null
}

View File

@@ -0,0 +1,17 @@
workspace:
base: /go
path: src/github.com/drone/envsubst
clone:
git:
image: plugins/git
depth: 50
pipeline:
build:
image: tutum/curl
# A container named "vpn" should exist on the same docker daemon
network_mode: "container:vpn"
# Replace HOST_OR_IP with the IP or hostname of a server behind the VPN
commands:
- curl -s -f -L http://HOST_OR_IP/