forked from Ivasoft/drone-docker
Compare commits
44 Commits
update-win
...
windows_im
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0bc05d3d59 | ||
|
|
1ba794cc2c | ||
|
|
4322b7a867 | ||
|
|
a8d69304f4 | ||
|
|
64fb40b176 | ||
|
|
318241a06c | ||
|
|
090bbdbb73 | ||
|
|
cbbb5d0692 | ||
|
|
4d8c628184 | ||
|
|
0244fdbc12 | ||
|
|
28105d09d1 | ||
|
|
501eae03f2 | ||
|
|
5490a1c24c | ||
|
|
6ec5e71411 | ||
|
|
0911e6a922 | ||
|
|
88f8bf1cb0 | ||
|
|
2d70a1fa7c | ||
|
|
607b04a871 | ||
|
|
e44c2d46ea | ||
|
|
72ef7b1f3f | ||
|
|
fbbeec5a2e | ||
|
|
b1d8698d1c | ||
|
|
d4cf9f20f1 | ||
|
|
f75380013d | ||
|
|
c10d36754c | ||
|
|
dd359dfc72 | ||
|
|
729aa5d300 | ||
|
|
db5c2161fe | ||
|
|
f08821b024 | ||
|
|
0f6bd8a62e | ||
|
|
5760e7b4e8 | ||
|
|
7ade37a140 | ||
|
|
319660d758 | ||
|
|
bd4029884c | ||
|
|
b1959299c7 | ||
|
|
bfdf3034c1 | ||
|
|
9c86f98ea5 | ||
|
|
faec3cf9d8 | ||
|
|
ad1fa9495f | ||
|
|
799cc8e35e | ||
|
|
5834d8dff9 | ||
|
|
4abe7c9d20 | ||
|
|
3501d9a65d | ||
|
|
d8b6b48fa3 |
627
.drone.yml
627
.drone.yml
File diff suppressed because it is too large
Load Diff
2
.github_changelog_generator
Normal file
2
.github_changelog_generator
Normal file
@@ -0,0 +1,2 @@
|
||||
since-tag=v19.03.8
|
||||
|
||||
35
CHANGELOG.md
Normal file
35
CHANGELOG.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Changelog
|
||||
|
||||
## [v20.10.9](https://github.com/drone-plugins/drone-docker/tree/v20.10.9) (2021-11-02)
|
||||
|
||||
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v19.03.9...v20.10.9)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Upgrade Docker dind to 20.10.9 for 64bit platforms [\#334](https://github.com/drone-plugins/drone-docker/pull/334) ([gzm0](https://github.com/gzm0))
|
||||
|
||||
## [v19.03.9](https://github.com/drone-plugins/drone-docker/tree/v19.03.9) (2021-10-13)
|
||||
|
||||
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v19.03.8...v19.03.9)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- adding support for externalId [\#333](https://github.com/drone-plugins/drone-docker/pull/333) ([jimsheldon](https://github.com/jimsheldon))
|
||||
- Add support for automatic opencontainer labels [\#313](https://github.com/drone-plugins/drone-docker/pull/313) ([codrut-fc](https://github.com/codrut-fc))
|
||||
- add custom seccomp profile [\#312](https://github.com/drone-plugins/drone-docker/pull/312) ([xoxys](https://github.com/xoxys))
|
||||
- ECR: adding setting to enable image scanning while repo creation [\#300](https://github.com/drone-plugins/drone-docker/pull/300) ([rvoitenko](https://github.com/rvoitenko))
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- Revert "Update seccomp to 20.10 docker" [\#325](https://github.com/drone-plugins/drone-docker/pull/325) ([bradrydzewski](https://github.com/bradrydzewski))
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- \(maint\) bump git to 1.13 for build and test [\#338](https://github.com/drone-plugins/drone-docker/pull/338) ([tphoney](https://github.com/tphoney))
|
||||
- \(maint\) v19.03.9 release prep [\#337](https://github.com/drone-plugins/drone-docker/pull/337) ([tphoney](https://github.com/tphoney))
|
||||
- \(maint\) CI, remove the dry run steps, due to rate limiting [\#323](https://github.com/drone-plugins/drone-docker/pull/323) ([tphoney](https://github.com/tphoney))
|
||||
- Update seccomp to 20.10 docker [\#322](https://github.com/drone-plugins/drone-docker/pull/322) ([techknowlogick](https://github.com/techknowlogick))
|
||||
|
||||
|
||||
|
||||
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
||||
20
README.md
20
README.md
@@ -72,3 +72,23 @@ docker run --rm \
|
||||
--privileged \
|
||||
plugins/docker --dry-run
|
||||
```
|
||||
|
||||
## Release procedure
|
||||
|
||||
Run the changelog generator.
|
||||
|
||||
```BASH
|
||||
docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone-plugins -p drone-docker -t <secret github token>
|
||||
```
|
||||
|
||||
You can generate a token by logging into your GitHub account and going to Settings -> Personal access tokens.
|
||||
|
||||
Next we tag the PR's with the fixes or enhancements labels. If the PR does not fufil the requirements, do not add a label.
|
||||
|
||||
Run the changelog generator again with the future version according to semver.
|
||||
|
||||
```BASH
|
||||
docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone-plugins -p drone-docker -t <secret token> --future-release v1.0.0
|
||||
```
|
||||
|
||||
Create your pull request for the release. Get it merged then tag the release.
|
||||
@@ -50,7 +50,7 @@ func main() {
|
||||
cli.StringFlag{
|
||||
Name: "daemon.mirror",
|
||||
Usage: "docker daemon registry mirror",
|
||||
EnvVar: "PLUGIN_MIRROR",
|
||||
EnvVar: "PLUGIN_MIRROR,DOCKER_PLUGIN_MIRROR",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "daemon.storage-driver",
|
||||
@@ -192,6 +192,16 @@ func main() {
|
||||
Usage: "label-schema labels",
|
||||
EnvVar: "PLUGIN_LABEL_SCHEMA",
|
||||
},
|
||||
cli.BoolTFlag{
|
||||
Name: "auto-label",
|
||||
Usage: "auto-label true|false",
|
||||
EnvVar: "PLUGIN_AUTO_LABEL",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "link",
|
||||
Usage: "link https://example.com/org/repo-name",
|
||||
EnvVar: "PLUGIN_REPO_LINK,DRONE_REPO_LINK",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "docker.registry",
|
||||
Usage: "docker registry",
|
||||
@@ -216,7 +226,7 @@ func main() {
|
||||
cli.StringFlag{
|
||||
Name: "docker.config",
|
||||
Usage: "docker json dockerconfig content",
|
||||
EnvVar: "PLUGIN_CONFIG",
|
||||
EnvVar: "PLUGIN_CONFIG,DOCKER_PLUGIN_CONFIG",
|
||||
},
|
||||
cli.BoolTFlag{
|
||||
Name: "docker.purge",
|
||||
@@ -257,24 +267,26 @@ func run(c *cli.Context) error {
|
||||
Config: c.String("docker.config"),
|
||||
},
|
||||
Build: docker.Build{
|
||||
Remote: c.String("remote.url"),
|
||||
Name: c.String("commit.sha"),
|
||||
Dockerfile: c.String("dockerfile"),
|
||||
Context: c.String("context"),
|
||||
Tags: c.StringSlice("tags"),
|
||||
Args: c.StringSlice("args"),
|
||||
ArgsEnv: c.StringSlice("args-from-env"),
|
||||
Target: c.String("target"),
|
||||
Squash: c.Bool("squash"),
|
||||
Pull: c.BoolT("pull-image"),
|
||||
CacheFrom: c.StringSlice("cache-from"),
|
||||
Compress: c.Bool("compress"),
|
||||
Repo: c.String("repo"),
|
||||
Labels: c.StringSlice("custom-labels"),
|
||||
LabelSchema: c.StringSlice("label-schema"),
|
||||
NoCache: c.Bool("no-cache"),
|
||||
AddHost: c.StringSlice("add-host"),
|
||||
Quiet: c.Bool("quiet"),
|
||||
Remote: c.String("remote.url"),
|
||||
Name: c.String("commit.sha"),
|
||||
Dockerfile: c.String("dockerfile"),
|
||||
Context: c.String("context"),
|
||||
Tags: c.StringSlice("tags"),
|
||||
Args: c.StringSlice("args"),
|
||||
ArgsEnv: c.StringSlice("args-from-env"),
|
||||
Target: c.String("target"),
|
||||
Squash: c.Bool("squash"),
|
||||
Pull: c.BoolT("pull-image"),
|
||||
CacheFrom: c.StringSlice("cache-from"),
|
||||
Compress: c.Bool("compress"),
|
||||
Repo: c.String("repo"),
|
||||
Labels: c.StringSlice("custom-labels"),
|
||||
LabelSchema: c.StringSlice("label-schema"),
|
||||
AutoLabel: c.BoolT("auto-label"),
|
||||
Link: c.String("link"),
|
||||
NoCache: c.Bool("no-cache"),
|
||||
AddHost: c.StringSlice("add-host"),
|
||||
Quiet: c.Bool("quiet"),
|
||||
},
|
||||
Daemon: docker.Daemon{
|
||||
Registry: c.String("docker.registry"),
|
||||
|
||||
@@ -37,6 +37,8 @@ func main() {
|
||||
lifecyclePolicy = getenv("PLUGIN_LIFECYCLE_POLICY")
|
||||
repositoryPolicy = getenv("PLUGIN_REPOSITORY_POLICY")
|
||||
assumeRole = getenv("PLUGIN_ASSUME_ROLE")
|
||||
externalId = getenv("PLUGIN_EXTERNAL_ID")
|
||||
scanOnPush = parseBoolOrDefault(false, getenv("PLUGIN_SCAN_ON_PUSH"))
|
||||
)
|
||||
|
||||
// set the region
|
||||
@@ -56,7 +58,7 @@ func main() {
|
||||
log.Fatal(fmt.Sprintf("error creating aws session: %v", err))
|
||||
}
|
||||
|
||||
svc := getECRClient(sess, assumeRole)
|
||||
svc := getECRClient(sess, assumeRole, externalId)
|
||||
username, password, defaultRegistry, err := getAuthInfo(svc)
|
||||
|
||||
if registry == "" {
|
||||
@@ -72,10 +74,14 @@ func main() {
|
||||
}
|
||||
|
||||
if create {
|
||||
err = ensureRepoExists(svc, trimHostname(repo, registry))
|
||||
err = ensureRepoExists(svc, trimHostname(repo, registry), scanOnPush)
|
||||
if err != nil {
|
||||
log.Fatal(fmt.Sprintf("error creating ECR repo: %v", err))
|
||||
}
|
||||
err = updateImageScannningConfig(svc, trimHostname(repo, registry), scanOnPush)
|
||||
if err != nil {
|
||||
log.Fatal(fmt.Sprintf("error updating scan on push for ECR repo: %v", err))
|
||||
}
|
||||
}
|
||||
|
||||
if lifecyclePolicy != "" {
|
||||
@@ -118,9 +124,10 @@ func trimHostname(repo, registry string) string {
|
||||
return repo
|
||||
}
|
||||
|
||||
func ensureRepoExists(svc *ecr.ECR, name string) (err error) {
|
||||
func ensureRepoExists(svc *ecr.ECR, name string, scanOnPush bool) (err error) {
|
||||
input := &ecr.CreateRepositoryInput{}
|
||||
input.SetRepositoryName(name)
|
||||
input.SetImageScanningConfiguration(&ecr.ImageScanningConfiguration{ScanOnPush: &scanOnPush})
|
||||
_, err = svc.CreateRepository(input)
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok && aerr.Code() == ecr.ErrCodeRepositoryAlreadyExistsException {
|
||||
@@ -132,6 +139,15 @@ func ensureRepoExists(svc *ecr.ECR, name string) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func updateImageScannningConfig(svc *ecr.ECR, name string, scanOnPush bool) (err error) {
|
||||
input := &ecr.PutImageScanningConfigurationInput{}
|
||||
input.SetRepositoryName(name)
|
||||
input.SetImageScanningConfiguration(&ecr.ImageScanningConfiguration{ScanOnPush: &scanOnPush})
|
||||
_, err = svc.PutImageScanningConfiguration(input)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func uploadLifeCyclePolicy(svc *ecr.ECR, lifecyclePolicy string, name string) (err error) {
|
||||
input := &ecr.PutLifecyclePolicyInput{}
|
||||
input.SetLifecyclePolicyText(lifecyclePolicy)
|
||||
@@ -193,11 +209,19 @@ func getenv(key ...string) (s string) {
|
||||
return
|
||||
}
|
||||
|
||||
func getECRClient(sess *session.Session, role string) *ecr.ECR {
|
||||
func getECRClient(sess *session.Session, role string, externalId string) *ecr.ECR {
|
||||
if role == "" {
|
||||
return ecr.New(sess)
|
||||
}
|
||||
return ecr.New(sess, &aws.Config{
|
||||
Credentials: stscreds.NewCredentials(sess, role),
|
||||
})
|
||||
if externalId != "" {
|
||||
return ecr.New(sess, &aws.Config{
|
||||
Credentials: stscreds.NewCredentials(sess, role, func(p *stscreds.AssumeRoleProvider) {
|
||||
p.ExternalID = &externalId
|
||||
}),
|
||||
})
|
||||
} else {
|
||||
return ecr.New(sess, &aws.Config{
|
||||
Credentials: stscreds.NewCredentials(sess, role),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
85
docker.go
85
docker.go
@@ -53,7 +53,9 @@ type (
|
||||
Compress bool // Docker build compress
|
||||
Repo string // Docker build repository
|
||||
LabelSchema []string // label-schema Label map
|
||||
AutoLabel bool // auto-label bool
|
||||
Labels []string // Label map
|
||||
Link string // Git repo link
|
||||
NoCache bool // Docker build no-cache
|
||||
AddHost []string // Docker build add-host
|
||||
Quiet bool // Docker build quiet
|
||||
@@ -78,36 +80,24 @@ func (p Plugin) Exec() error {
|
||||
|
||||
// poll the docker daemon until it is started. This ensures the daemon is
|
||||
// ready to accept connections before we proceed.
|
||||
for i := 0; i < 15; i++ {
|
||||
for i := 0; ; i++ {
|
||||
cmd := commandInfo()
|
||||
err := cmd.Run()
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
if i == 15 {
|
||||
fmt.Println("Unable to reach Docker Daemon after 15 attempts.")
|
||||
break
|
||||
}
|
||||
time.Sleep(time.Second * 1)
|
||||
}
|
||||
|
||||
// Create Auth Config File
|
||||
if p.Login.Config != "" {
|
||||
os.MkdirAll(dockerHome, 0600)
|
||||
|
||||
path := filepath.Join(dockerHome, "config.json")
|
||||
err := ioutil.WriteFile(path, []byte(p.Login.Config), 0600)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error writeing config.json: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
// login to the Docker registry
|
||||
if p.Login.Password != "" {
|
||||
cmd := commandLogin(p.Login)
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error authenticating: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
// for debugging purposes, log the type of authentication
|
||||
// credentials that have been provided.
|
||||
switch {
|
||||
case p.Login.Password != "" && p.Login.Config != "":
|
||||
fmt.Println("Detected registry credentials and registry credentials file")
|
||||
case p.Login.Password != "":
|
||||
fmt.Println("Detected registry credentials")
|
||||
case p.Login.Config != "":
|
||||
@@ -116,6 +106,29 @@ func (p Plugin) Exec() error {
|
||||
fmt.Println("Registry credentials or Docker config not provided. Guest mode enabled.")
|
||||
}
|
||||
|
||||
// create Auth Config File
|
||||
if p.Login.Config != "" {
|
||||
os.MkdirAll(dockerHome, 0600)
|
||||
|
||||
path := filepath.Join(dockerHome, "config.json")
|
||||
err := ioutil.WriteFile(path, []byte(p.Login.Config), 0600)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error writing config.json: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
// login to the Docker registry
|
||||
if p.Login.Password != "" {
|
||||
cmd := commandLogin(p.Login)
|
||||
raw, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
out := string(raw)
|
||||
out = strings.Replace(out, "WARNING! Using --password via the CLI is insecure. Use --password-stdin.", "", -1)
|
||||
fmt.Println(out)
|
||||
return fmt.Errorf("Error authenticating: exit status 1")
|
||||
}
|
||||
}
|
||||
|
||||
if p.Build.Squash && !p.Daemon.Experimental {
|
||||
fmt.Println("Squash build flag is only available when Docker deamon is started with experimental flag. Ignoring...")
|
||||
p.Build.Squash = false
|
||||
@@ -252,19 +265,22 @@ func commandBuild(build Build) *exec.Cmd {
|
||||
args = append(args, "--quiet")
|
||||
}
|
||||
|
||||
labelSchema := []string{
|
||||
"schema-version=1.0",
|
||||
fmt.Sprintf("build-date=%s", time.Now().Format(time.RFC3339)),
|
||||
fmt.Sprintf("vcs-ref=%s", build.Name),
|
||||
fmt.Sprintf("vcs-url=%s", build.Remote),
|
||||
}
|
||||
if build.AutoLabel {
|
||||
labelSchema := []string{
|
||||
fmt.Sprintf("created=%s", time.Now().Format(time.RFC3339)),
|
||||
fmt.Sprintf("revision=%s", build.Name),
|
||||
fmt.Sprintf("source=%s", build.Remote),
|
||||
fmt.Sprintf("url=%s", build.Link),
|
||||
}
|
||||
labelPrefix := "org.opencontainers.image"
|
||||
|
||||
if len(build.LabelSchema) > 0 {
|
||||
labelSchema = append(labelSchema, build.LabelSchema...)
|
||||
}
|
||||
if len(build.LabelSchema) > 0 {
|
||||
labelSchema = append(labelSchema, build.LabelSchema...)
|
||||
}
|
||||
|
||||
for _, label := range labelSchema {
|
||||
args = append(args, "--label", fmt.Sprintf("org.label-schema.%s", label))
|
||||
for _, label := range labelSchema {
|
||||
args = append(args, "--label", fmt.Sprintf("%s.%s", labelPrefix, label))
|
||||
}
|
||||
}
|
||||
|
||||
if len(build.Labels) > 0 {
|
||||
@@ -343,6 +359,10 @@ func commandDaemon(daemon Daemon) *exec.Cmd {
|
||||
"--host=unix:///var/run/docker.sock",
|
||||
}
|
||||
|
||||
if _, err := os.Stat("/etc/docker/default.json"); err == nil {
|
||||
args = append(args, "--seccomp-profile=/etc/docker/default.json")
|
||||
}
|
||||
|
||||
if daemon.StorageDriver != "" {
|
||||
args = append(args, "-s", daemon.StorageDriver)
|
||||
}
|
||||
@@ -373,7 +393,6 @@ func commandDaemon(daemon Daemon) *exec.Cmd {
|
||||
return exec.Command(dockerdExe, args...)
|
||||
}
|
||||
|
||||
|
||||
// helper to check if args match "docker prune"
|
||||
func isCommandPrune(args []string) bool {
|
||||
return len(args) > 3 && args[2] == "prune"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# escape=`
|
||||
FROM plugins/docker:windows-1803
|
||||
FROM plugins/docker:windows-1803-amd64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone ACR" `
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# escape=`
|
||||
FROM plugins/docker:windows-1809
|
||||
FROM plugins/docker:windows-1809-amd64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone ACR" `
|
||||
|
||||
10
docker/acr/Dockerfile.windows.1909
Normal file
10
docker/acr/Dockerfile.windows.1909
Normal file
@@ -0,0 +1,10 @@
|
||||
# escape=`
|
||||
FROM plugins/docker:windows-1909-amd64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone ACR" `
|
||||
org.label-schema.vendor="Drone.IO Community" `
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
ADD release/windows/amd64/drone-acr.exe C:/bin/drone-acr.exe
|
||||
ENTRYPOINT [ "C:\\bin\\drone-acr.exe" ]
|
||||
@@ -24,14 +24,26 @@ manifests:
|
||||
os: linux
|
||||
variant: v7
|
||||
-
|
||||
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
|
||||
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1803
|
||||
-
|
||||
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
|
||||
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1809
|
||||
-
|
||||
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1903
|
||||
-
|
||||
image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1909
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM docker:19.03.8-dind
|
||||
FROM docker:20.10.9-dind
|
||||
|
||||
ENV DOCKER_HOST=unix:///var/run/docker.sock
|
||||
|
||||
|
||||
@@ -2,5 +2,14 @@ FROM arm32v6/docker:19.03.8-dind
|
||||
|
||||
ENV DOCKER_HOST=unix:///var/run/docker.sock
|
||||
|
||||
RUN apk --update add --virtual .build-deps curl && \
|
||||
mkdir -p /etc/docker/ && \
|
||||
curl -SsL -o /etc/docker/default.json https://raw.githubusercontent.com/moby/moby/19.03/profiles/seccomp/default.json && \
|
||||
sed -i 's/SCMP_ACT_ERRNO/SCMP_ACT_TRACE/g' /etc/docker/default.json && \
|
||||
chmod 600 /etc/docker/default.json && \
|
||||
apk del .build-deps && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ADD release/linux/arm/drone-docker /bin/
|
||||
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-docker"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM arm64v8/docker:19.03.8-dind
|
||||
FROM arm64v8/docker:20.10.9-dind
|
||||
|
||||
ENV DOCKER_HOST=unix:///var/run/docker.sock
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ manifests:
|
||||
os: linux
|
||||
variant: v7
|
||||
-
|
||||
image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
|
||||
image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# escape=`
|
||||
FROM plugins/docker:windows-1803
|
||||
FROM plugins/docker:windows-1803-amd64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone ECR" `
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# escape=`
|
||||
FROM plugins/docker:windows-1809
|
||||
FROM plugins/docker:windows-1809-amd64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone ECR" `
|
||||
|
||||
10
docker/ecr/Dockerfile.windows.1909
Normal file
10
docker/ecr/Dockerfile.windows.1909
Normal file
@@ -0,0 +1,10 @@
|
||||
# escape=`
|
||||
FROM plugins/docker:windows-1909-amd64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone ECR" `
|
||||
org.label-schema.vendor="Drone.IO Community" `
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
ADD release/windows/amd64/drone-ecr.exe C:/bin/drone-ecr.exe
|
||||
ENTRYPOINT [ "C:\\bin\\drone-ecr.exe" ]
|
||||
@@ -24,14 +24,26 @@ manifests:
|
||||
os: linux
|
||||
variant: v7
|
||||
-
|
||||
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
|
||||
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1803
|
||||
-
|
||||
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
|
||||
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1809
|
||||
-
|
||||
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1903
|
||||
-
|
||||
image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1909
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# escape=`
|
||||
FROM plugins/docker:windows-1803
|
||||
FROM plugins/docker:windows-1803-amd64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone GCR" `
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# escape=`
|
||||
FROM plugins/docker:windows-1809
|
||||
FROM plugins/docker:windows-1809-amd64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone GCR" `
|
||||
|
||||
10
docker/gcr/Dockerfile.windows.1909
Normal file
10
docker/gcr/Dockerfile.windows.1909
Normal file
@@ -0,0 +1,10 @@
|
||||
# escape=`
|
||||
FROM plugins/docker:windows-1909-amd64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone GCR" `
|
||||
org.label-schema.vendor="Drone.IO Community" `
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
ADD release/windows/amd64/drone-gcr.exe C:/bin/drone-gcr.exe
|
||||
ENTRYPOINT [ "C:\\bin\\drone-gcr.exe" ]
|
||||
@@ -24,14 +24,20 @@ manifests:
|
||||
os: linux
|
||||
variant: v7
|
||||
-
|
||||
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
|
||||
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1803
|
||||
-
|
||||
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
|
||||
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1809
|
||||
-
|
||||
image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1909
|
||||
|
||||
16
go.mod
16
go.mod
@@ -2,12 +2,20 @@ module github.com/drone-plugins/drone-docker
|
||||
|
||||
require (
|
||||
github.com/aws/aws-sdk-go v1.26.7
|
||||
github.com/coreos/go-semver v0.2.0
|
||||
github.com/coreos/go-semver v0.3.0
|
||||
github.com/joho/godotenv v1.3.0
|
||||
github.com/sirupsen/logrus v1.3.0
|
||||
github.com/urfave/cli v1.22.2
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e // indirect
|
||||
golang.org/x/text v0.3.0 // indirect
|
||||
)
|
||||
|
||||
go 1.13
|
||||
require (
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.0.1 // indirect
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 // indirect
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 // indirect
|
||||
)
|
||||
|
||||
go 1.17
|
||||
|
||||
11
go.sum
11
go.sum
@@ -1,8 +1,8 @@
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/aws/aws-sdk-go v1.26.7 h1:ObjEnmzvSdYy8KVd3me7v/UMyCn81inLy2SyoIPoBkg=
|
||||
github.com/aws/aws-sdk-go v1.26.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
@@ -24,19 +24,12 @@ github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
|
||||
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
||||
@@ -5,7 +5,7 @@ local test_pipeline_name = 'testing';
|
||||
local windows(os) = os == 'windows';
|
||||
|
||||
local golang_image(os, version) =
|
||||
'golang:' + '1.11' + if windows(os) then '-windowsservercore-' + version else '';
|
||||
'golang:' + '1.13' + if windows(os) then '-windowsservercore-' + version else '';
|
||||
|
||||
{
|
||||
test(os='linux', arch='amd64', version='')::
|
||||
|
||||
Reference in New Issue
Block a user