-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feat) netrc envs are set through k8s secrets (#67)
* netrc envs are set through k8s secrets * rework of compile unit tests for netrc
- Loading branch information
1 parent
8604b5a
commit 00581f9
Showing
5 changed files
with
357 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"platform": {}, | ||
"pod_spec": { | ||
"name": "random", | ||
"labels": {}, | ||
"annotations": {} | ||
}, | ||
"steps": [ | ||
{ | ||
"id": "random", | ||
"environment": {}, | ||
"image": "drone/git:latest", | ||
"placeholder": "drone/placeholder:1", | ||
"labels": {}, | ||
"name": "clone", | ||
"run_policy": "always", | ||
"secrets": [ | ||
{ "name": "DRONE_NETRC_MACHINE", "env": "DRONE_NETRC_MACHINE" }, | ||
{ "name": "DRONE_NETRC_USERNAME", "env": "DRONE_NETRC_USERNAME" }, | ||
{ "name": "DRONE_NETRC_PASSWORD", "env": "DRONE_NETRC_PASSWORD" }, | ||
{ "name": "DRONE_NETRC_FILE", "env": "DRONE_NETRC_FILE" } | ||
], | ||
"spec_secrets": [ | ||
{ "name": "DRONE_NETRC_MACHINE", "data": "github.com" }, | ||
{ "name": "DRONE_NETRC_USERNAME", "data": "octocat", "mask": true }, | ||
{ "name": "DRONE_NETRC_PASSWORD", "data": "correct-horse-battery-staple", "mask": true }, | ||
{ "name": "DRONE_NETRC_FILE", "data": "machine github.com login octocat password correct-horse-battery-staple" } | ||
], | ||
"volumes": [ | ||
{ | ||
"name": "_workspace", | ||
"path": "/drone/src" | ||
}, | ||
{ | ||
"name": "_status", | ||
"path": "/run/drone" | ||
} | ||
], | ||
"working_dir": "/drone/src" | ||
}, | ||
{ | ||
"id": "random", | ||
"args": [ | ||
"echo \"$DRONE_SCRIPT\" | /bin/sh" | ||
], | ||
"depends_on": [ | ||
"clone" | ||
], | ||
"entrypoint": [ | ||
"/bin/sh", | ||
"-c" | ||
], | ||
"environment": {}, | ||
"labels": {}, | ||
"name": "build", | ||
"image": "docker.io/library/golang:latest", | ||
"placeholder": "drone/placeholder:1", | ||
"secrets": [ | ||
{ "name": "DRONE_NETRC_MACHINE", "env": "DRONE_NETRC_MACHINE" }, | ||
{ "name": "DRONE_NETRC_USERNAME", "env": "DRONE_NETRC_USERNAME" }, | ||
{ "name": "DRONE_NETRC_PASSWORD", "env": "DRONE_NETRC_PASSWORD" }, | ||
{ "name": "DRONE_NETRC_FILE", "env": "DRONE_NETRC_FILE" } | ||
], | ||
"spec_secrets": [ | ||
{ "name": "DRONE_NETRC_MACHINE", "data": "github.com" }, | ||
{ "name": "DRONE_NETRC_USERNAME", "data": "octocat", "mask": true }, | ||
{ "name": "DRONE_NETRC_PASSWORD", "data": "correct-horse-battery-staple", "mask": true }, | ||
{ "name": "DRONE_NETRC_FILE", "data": "machine github.com login octocat password correct-horse-battery-staple" } | ||
], | ||
"volumes": [ | ||
{ | ||
"name": "_workspace", | ||
"path": "/drone/src" | ||
}, | ||
{ | ||
"name": "_status", | ||
"path": "/run/drone" | ||
} | ||
], | ||
"working_dir": "/drone/src" | ||
} | ||
], | ||
"volumes": [ | ||
{ | ||
"temp": { | ||
"id": "random", | ||
"name": "_workspace", | ||
"labels": {} | ||
} | ||
}, | ||
{ | ||
"downward_api": { | ||
"id": "random", | ||
"name": "_status", | ||
"items": [ | ||
{ | ||
"path": "env", | ||
"field_path": "metadata.annotations" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"secrets": { | ||
"DRONE_NETRC_MACHINE": { "name": "DRONE_NETRC_MACHINE", "data": "github.com" }, | ||
"DRONE_NETRC_USERNAME": { "name": "DRONE_NETRC_USERNAME", "data": "octocat", "mask": true }, | ||
"DRONE_NETRC_PASSWORD": { "name": "DRONE_NETRC_PASSWORD", "data": "correct-horse-battery-staple", "mask": true }, | ||
"DRONE_NETRC_FILE": { "name": "DRONE_NETRC_FILE", "data": "machine github.com login octocat password correct-horse-battery-staple" } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
kind: pipeline | ||
type: kubernetes | ||
name: default | ||
|
||
steps: | ||
- name: build | ||
image: golang | ||
commands: | ||
- go build |
Oops, something went wrong.