mirror of
https://github.com/thegeeklab/wp-ansible.git
synced 2024-11-22 10:00:38 +00:00
chore(deps): update module go to 1.19 (#97)
This commit is contained in:
parent
c0bd3974e7
commit
9aaf419f35
18
.drone.star
18
.drone.star
@ -32,7 +32,7 @@ def test(ctx):
|
|||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"name": "deps",
|
"name": "deps",
|
||||||
"image": "golang:1.18",
|
"image": "golang:1.19",
|
||||||
"commands": [
|
"commands": [
|
||||||
"make deps",
|
"make deps",
|
||||||
],
|
],
|
||||||
@ -45,7 +45,7 @@ def test(ctx):
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "generate",
|
"name": "generate",
|
||||||
"image": "golang:1.18",
|
"image": "golang:1.19",
|
||||||
"commands": [
|
"commands": [
|
||||||
"make generate",
|
"make generate",
|
||||||
],
|
],
|
||||||
@ -58,7 +58,7 @@ def test(ctx):
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "lint",
|
"name": "lint",
|
||||||
"image": "golang:1.18",
|
"image": "golang:1.19",
|
||||||
"commands": [
|
"commands": [
|
||||||
"make lint",
|
"make lint",
|
||||||
],
|
],
|
||||||
@ -71,7 +71,7 @@ def test(ctx):
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "test",
|
"name": "test",
|
||||||
"image": "golang:1.18",
|
"image": "golang:1.19",
|
||||||
"commands": [
|
"commands": [
|
||||||
"make test",
|
"make test",
|
||||||
],
|
],
|
||||||
@ -110,7 +110,7 @@ def build(ctx):
|
|||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"name": "generate",
|
"name": "generate",
|
||||||
"image": "golang:1.18",
|
"image": "golang:1.19",
|
||||||
"pull": "always",
|
"pull": "always",
|
||||||
"commands": [
|
"commands": [
|
||||||
"make generate",
|
"make generate",
|
||||||
@ -124,7 +124,7 @@ def build(ctx):
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "build",
|
"name": "build",
|
||||||
"image": "techknowlogick/xgo:go-1.18.x",
|
"image": "techknowlogick/xgo:go-1.19.x",
|
||||||
"pull": "always",
|
"pull": "always",
|
||||||
"commands": [
|
"commands": [
|
||||||
"make release",
|
"make release",
|
||||||
@ -138,7 +138,7 @@ def build(ctx):
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "executable",
|
"name": "executable",
|
||||||
"image": "golang:1.18",
|
"image": "golang:1.19",
|
||||||
"pull": "always",
|
"pull": "always",
|
||||||
"commands": [
|
"commands": [
|
||||||
"$(find dist/ -executable -type f -iname drone-ansible-linux-amd64) --help",
|
"$(find dist/ -executable -type f -iname drone-ansible-linux-amd64) --help",
|
||||||
@ -205,7 +205,7 @@ def docker(ctx, arch):
|
|||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"name": "generate",
|
"name": "generate",
|
||||||
"image": "golang:1.18",
|
"image": "golang:1.19",
|
||||||
"pull": "always",
|
"pull": "always",
|
||||||
"commands": [
|
"commands": [
|
||||||
"make generate",
|
"make generate",
|
||||||
@ -219,7 +219,7 @@ def docker(ctx, arch):
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "build",
|
"name": "build",
|
||||||
"image": "golang:1.18",
|
"image": "golang:1.19",
|
||||||
"pull": "always",
|
"pull": "always",
|
||||||
"commands": [
|
"commands": [
|
||||||
"make build",
|
"make build",
|
||||||
|
@ -28,4 +28,4 @@ run:
|
|||||||
linters-settings:
|
linters-settings:
|
||||||
gofumpt:
|
gofumpt:
|
||||||
extra-rules: true
|
extra-rules: true
|
||||||
lang-version: "1.18"
|
lang-version: "1.19"
|
||||||
|
2
Makefile
2
Makefile
@ -20,7 +20,7 @@ XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
|||||||
|
|
||||||
GENERATE ?= $(IMPORT)/pkg/templates
|
GENERATE ?= $(IMPORT)/pkg/templates
|
||||||
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
||||||
XGO_VERSION := go-1.18.x
|
XGO_VERSION := go-1.19.x
|
||||||
XGO_TARGETS ?= linux/amd64,linux/arm-6,linux/arm64,darwin/amd64,darwin/arm64,windows/amd64
|
XGO_TARGETS ?= linux/amd64,linux/arm-6,linux/arm64,darwin/amd64,darwin/arm64,windows/amd64
|
||||||
|
|
||||||
TAGS ?= netgo
|
TAGS ?= netgo
|
||||||
|
2
go.mod
2
go.mod
@ -1,6 +1,6 @@
|
|||||||
module github.com/owncloud-ci/drone-ansible
|
module github.com/owncloud-ci/drone-ansible
|
||||||
|
|
||||||
go 1.18
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/drone-plugins/drone-plugin-lib v0.4.0
|
github.com/drone-plugins/drone-plugin-lib v0.4.0
|
||||||
|
@ -2,7 +2,6 @@ package plugin
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -28,7 +27,7 @@ func (p *Plugin) ansibleConfig() error {
|
|||||||
return errors.Wrap(err, "failed to create ansible directory")
|
return errors.Wrap(err, "failed to create ansible directory")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := ioutil.WriteFile(ansibleConfig, []byte(ansibleContent), 0o600); err != nil {
|
if err := os.WriteFile(ansibleConfig, []byte(ansibleContent), 0o600); err != nil {
|
||||||
return errors.Wrap(err, "failed to create ansible config")
|
return errors.Wrap(err, "failed to create ansible config")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,7 +35,7 @@ func (p *Plugin) ansibleConfig() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *Plugin) privateKey() error {
|
func (p *Plugin) privateKey() error {
|
||||||
tmpfile, err := ioutil.TempFile("", "privateKey")
|
tmpfile, err := os.CreateTemp("", "privateKey")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "failed to create private key file")
|
return errors.Wrap(err, "failed to create private key file")
|
||||||
}
|
}
|
||||||
@ -54,7 +53,7 @@ func (p *Plugin) privateKey() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *Plugin) vaultPass() error {
|
func (p *Plugin) vaultPass() error {
|
||||||
tmpfile, err := ioutil.TempFile("", "vaultPass")
|
tmpfile, err := os.CreateTemp("", "vaultPass")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "failed to create vault password file")
|
return errors.Wrap(err, "failed to create vault password file")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user