mirror of
https://github.com/thegeeklab/wp-ansible.git
synced 2024-11-25 09:00:39 +00:00
Merge pull request #27 from drone-plugins/python3-upgrade
Upgrade to python3
This commit is contained in:
commit
9b66664807
@ -5,10 +5,10 @@ LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \
|
||||
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"]
|
||||
|
@ -5,10 +5,10 @@ LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \
|
||||
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"]
|
||||
|
@ -5,10 +5,10 @@ LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \
|
||||
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
plugin.go
11
plugin.go
@ -173,20 +173,25 @@ func (p *Plugin) vaultPass() error {
|
||||
}
|
||||
|
||||
func (p *Plugin) playbooks() error {
|
||||
var playbooks []string
|
||||
var (
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user