Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docker/Dockerfile.linux.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ LABEL maintainer="Drone.IO Community <[email protected]>" \
org.label-schema.vendor="Drone.IO Community" \
org.label-schema.schema-version="1.0"

RUN apk add --no-cache bash git curl rsync openssh-client py-pip py-requests python2-dev libffi-dev libressl-dev libressl build-base && \
pip install -U pip && \
pip install ansible==2.8.2 && \
apk del python2-dev libffi-dev libressl-dev build-base
RUN apk add --no-cache bash git curl rsync openssh-client py3-pip py3-requests python3-dev libffi-dev libressl-dev libressl build-base && \
pip3 install -U pip && \
pip3 install ansible==2.8.4 && \
apk del python3-dev libffi-dev libressl-dev build-base

ADD release/linux/amd64/drone-ansible /bin/
ENTRYPOINT ["/bin/drone-ansible"]
8 changes: 4 additions & 4 deletions docker/Dockerfile.linux.arm
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ LABEL maintainer="Drone.IO Community <[email protected]>" \
org.label-schema.vendor="Drone.IO Community" \
org.label-schema.schema-version="1.0"

RUN apk add --no-cache bash git curl rsync openssh-client py-pip py-requests python2-dev libffi-dev libressl-dev libressl build-base && \
pip install -U pip && \
pip install ansible==2.8.2 && \
apk del python2-dev libffi-dev libressl-dev build-base
RUN apk add --no-cache bash git curl rsync openssh-client py3-pip py3-requests python3-dev libffi-dev libressl-dev libressl build-base && \
pip3 install -U pip && \
pip3 install ansible==2.8.4 && \
apk del python3-dev libffi-dev libressl-dev build-base

ADD release/linux/arm/drone-ansible /bin/
ENTRYPOINT ["/bin/drone-ansible"]
8 changes: 4 additions & 4 deletions docker/Dockerfile.linux.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ LABEL maintainer="Drone.IO Community <[email protected]>" \
org.label-schema.vendor="Drone.IO Community" \
org.label-schema.schema-version="1.0"

RUN apk add --no-cache bash git curl rsync openssh-client py-pip py-requests python2-dev libffi-dev libressl-dev libressl build-base && \
pip install -U pip && \
pip install ansible==2.8.2 && \
apk del python2-dev libffi-dev libressl-dev build-base
RUN apk add --no-cache bash git curl rsync openssh-client py3-pip py3-requests python3-dev libffi-dev libressl-dev libressl build-base && \
pip3 install -U pip && \
pip3 install ansible==2.8.4 && \
apk del python3-dev libffi-dev libressl-dev build-base

ADD release/linux/arm64/drone-ansible /bin/
ENTRYPOINT ["/bin/drone-ansible"]
11 changes: 8 additions & 3 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,20 +173,25 @@ func (p *Plugin) vaultPass() error {
}

func (p *Plugin) playbooks() error {
var playbooks []string
var (
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why expand this for single local variable definition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's done with that schema on all plugins.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For global variables yes but at least from drone code func local variables are defined as var xxx ..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not within the plugin org, I have written that like it on every plugin that I have authored.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, ok, I was just asking ;)

playbooks []string
)

for _, p := range p.Config.Playbooks {
files, err := filepath.Glob(p)
// can there be a invalid glob pattern that still is a valid file name?
// just add it back to the list and let ansible return error out instead.

if err != nil {
playbooks = append(playbooks, p)
continue
}

playbooks = append(playbooks, files...)
}

if len(playbooks) == 0 {
return errors.New("failed to find playbook files")
}

p.Config.Playbooks = playbooks
return nil
}
Expand Down