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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.1
go-version: 1.25.7
- name: Setup gotestsum
uses: autero1/action-gotestsum@v2.0.0
with:
Expand All @@ -24,7 +24,7 @@ jobs:
rm -rf ./reports && mkdir ./reports;
gotestsum --format standard-verbose --junitfile ./reports/junit.xml --raw-command -- go test -parallel 5 --json ./...;
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2.16.1
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
files: "reports/*.xml"
6 changes: 3 additions & 3 deletions .github/workflows/release-dryrun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.1
go-version: 1.25.7
- name: Release CLI (GoReleaser)
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: latest
version: "~> v2"
args: release --clean --skip=publish --snapshot
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.1
go-version: 1.25.7
- name: Release CLI (GoReleaser)
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: latest
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This is an example .goreleaser.yml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
version: 2
before:
hooks:
# You may remove this if you don't use go modules.
Expand All @@ -25,7 +26,7 @@ archives:
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Version }}-next"
version_template: "{{ .Version }}-next"
changelog:
sort: asc
filters:
Expand Down
37 changes: 18 additions & 19 deletions build/package/alpine-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# syntax = docker/dockerfile:experimental
# syntax=docker/dockerfile:1

ARG GOVERSION=1.16
FROM golang:${GOVERSION} as builder
ARG GOVERSION=1.25.7

FROM golang:${GOVERSION} AS builder

RUN apt-get update && apt-get upgrade -y ca-certificates && apt-get install -y bash && apt-get install -y unzip

RUN curl -L -o gotestsum.tgz "https://github.com/gotestyourself/gotestsum/releases/download/v1.6.4/gotestsum_1.6.4_linux_amd64.tar.gz" && \
RUN curl -L -o gotestsum.tgz "https://github.com/gotestyourself/gotestsum/releases/download/v1.13.0/gotestsum_1.13.0_linux_amd64.tar.gz" && \
tar -C /usr/local/bin -xzf gotestsum.tgz && \
rm gotestsum.tgz && \
rm /usr/local/bin/LICENSE && \
rm /usr/local/bin/README.md;
rm -f /usr/local/bin/LICENSE && \
rm -f /usr/local/bin/README.md;

WORKDIR /app

Expand All @@ -31,25 +31,24 @@ RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o ./runiac ./cmd/runiac/

FROM hashicorp/terraform:0.14.4

RUN apk update
FROM hashicorp/terraform:1.14.6

# Common tools
RUN apk add bash \
&& apk add jq \
&& apk add curl \
&& apk add ca-certificates \
&& rm -rf /var/cache/apk/*
RUN apk add --no-cache \
bash \
jq \
curl \
ca-certificates

RUN mkdir -p $HOME/.terraform.d/plugins/linux_amd64
RUN mkdir -p $HOME/.terraform.d/plugin-cache

# Grab from builder
COPY --from=builder /app/runiac /usr/local/bin
COPY --from=builder /usr/local/bin/gotestsum /usr/local/bin/gotestsum

ENV TF_IN_AUTOMATION true
ENV GOVERSION ${GOVERSION} # https://github.com/gotestyourself/gotestsum/blob/782abf290e3d93b9c1a48f9aa76b70d65cae66ed/internal/junitxml/report.go#L126
ENV TF_IN_AUTOMATION=true
# Required by gotestsum JUnit XML report:
# https://github.com/gotestyourself/gotestsum/blob/782abf290e3d93b9c1a48f9aa76b70d65cae66ed/internal/junitxml/report.go#L126
ENV GOVERSION=${GOVERSION}

ENTRYPOINT [ "runiac" ]
ENTRYPOINT [ "runiac" ]
3 changes: 1 addition & 2 deletions cmd/cli/cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
Expand Down Expand Up @@ -299,7 +298,7 @@ func getMachineName() (string, error) {
return "", err
}

out, err := ioutil.ReadAll(stdout)
out, err := io.ReadAll(stdout)

if err := cmdd.Wait(); err != nil {
return "", err
Expand Down
19 changes: 9 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/optum/runiac

go 1.22.1
go 1.25.7

require (
github.com/AlecAivazis/survey/v2 v2.3.7
Expand All @@ -11,7 +11,7 @@ require (
github.com/gookit/color v1.5.4
github.com/gruntwork-io/go-commons v0.17.1
github.com/gruntwork-io/terratest v0.46.11
github.com/hashicorp/go-getter v1.7.5
github.com/hashicorp/go-getter v1.7.9
github.com/otiai10/copy v1.14.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/afero v1.11.0
Expand Down Expand Up @@ -58,7 +58,6 @@ require (
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
Expand All @@ -69,7 +68,7 @@ require (
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
github.com/urfave/cli/v2 v2.10.3 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
Expand All @@ -81,14 +80,14 @@ require (
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/sync v0.12.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/api v0.171.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
Expand Down
Loading
Loading