mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-19 18:12:43 -05:00
Re-enable docker tests in release workflow (#2960)
This commit is contained in:
164
.github/workflows/release_cli_and_assets.yml
vendored
164
.github/workflows/release_cli_and_assets.yml
vendored
@@ -411,88 +411,88 @@ jobs:
|
||||
chmod +x $GITHUB_WORKSPACE/tests/acceptance/run.sh
|
||||
$GITHUB_WORKSPACE/tests/acceptance/run.sh ${{ matrix.test_block }}.bats
|
||||
steampipe service stop --force
|
||||
#
|
||||
# docker_acceptance_test_debian:
|
||||
# name: Acceptance tests(Docker - Debian)
|
||||
# needs: [create_test_build,build_and_release_assets]
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# ref: ${{ github.event.ref }}
|
||||
#
|
||||
# - name: Prepare for downloads
|
||||
# id: prepare-for-downloads
|
||||
# run: |
|
||||
# mkdir ~/artifacts
|
||||
#
|
||||
# - name: Download Linux Build Artifacts
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: build-artifact-linux
|
||||
# path: ~/artifacts
|
||||
#
|
||||
# - name: Extract Ubuntu Artifacts and Install Binary
|
||||
# run: |
|
||||
# mkdir ~/build
|
||||
# tar -xf ~/artifacts/linux.tar.gz -C ~/build
|
||||
#
|
||||
# - name: Copy binary
|
||||
# run: |
|
||||
# cp ~/build/steampipe tests/dockertesting/debian
|
||||
#
|
||||
# - name: Build steampipe docker images
|
||||
# run: |
|
||||
# docker build -t spdebian tests/dockertesting/debian --build-arg TARGETBRANCH="${{ github.event.ref }}"
|
||||
# docker images
|
||||
#
|
||||
# - name: Create a container and run the test suite
|
||||
# timeout-minutes: 15
|
||||
# run: |
|
||||
# docker run --name steampipe-deb `docker images -q spdebian`
|
||||
# echo "docker run complete"
|
||||
#
|
||||
# docker_acceptance_test_oraclelinux:
|
||||
# name: Acceptance tests(Docker - OracleLinux)
|
||||
# needs: [create_test_build,build_and_release_assets]
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# ref: ${{ github.event.ref }}
|
||||
#
|
||||
# - name: Prepare for downloads
|
||||
# id: prepare-for-downloads
|
||||
# run: |
|
||||
# mkdir ~/artifacts
|
||||
#
|
||||
# - name: Download Linux Build Artifacts
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: build-artifact-linux
|
||||
# path: ~/artifacts
|
||||
#
|
||||
# - name: Extract Ubuntu Artifacts and Install Binary
|
||||
# run: |
|
||||
# mkdir ~/build
|
||||
# tar -xf ~/artifacts/linux.tar.gz -C ~/build
|
||||
#
|
||||
# - name: Copy binary
|
||||
# run: |
|
||||
# cp ~/build/steampipe tests/dockertesting/oraclelinux
|
||||
#
|
||||
# - name: Build steampipe docker images
|
||||
# run: |
|
||||
# docker build -t sporacle tests/dockertesting/oraclelinux --build-arg TARGETBRANCH="${{ github.event.ref }}"
|
||||
# docker images
|
||||
#
|
||||
# - name: Create a container and run the test suite
|
||||
# timeout-minutes: 15
|
||||
# run: |
|
||||
# docker run --name steampipe-oracle `docker images -q sporacle`
|
||||
# echo "docker run complete"
|
||||
|
||||
docker_acceptance_test_debian:
|
||||
name: Acceptance tests(Docker - Debian)
|
||||
needs: [create_test_build,build_and_release_assets]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.ref }}
|
||||
|
||||
- name: Prepare for downloads
|
||||
id: prepare-for-downloads
|
||||
run: |
|
||||
mkdir ~/artifacts
|
||||
|
||||
- name: Download Linux Build Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build-artifact-linux
|
||||
path: ~/artifacts
|
||||
|
||||
- name: Extract Ubuntu Artifacts and Install Binary
|
||||
run: |
|
||||
mkdir ~/build
|
||||
tar -xf ~/artifacts/linux.tar.gz -C ~/build
|
||||
|
||||
- name: Copy binary
|
||||
run: |
|
||||
cp ~/build/steampipe tests/dockertesting/debian
|
||||
|
||||
- name: Build steampipe docker images
|
||||
run: |
|
||||
docker build -t spdebian tests/dockertesting/debian --build-arg TARGETBRANCH="${{ github.event.ref }}"
|
||||
docker images
|
||||
|
||||
- name: Create a container and run the test suite
|
||||
timeout-minutes: 15
|
||||
run: |
|
||||
docker run --name steampipe-deb `docker images -q spdebian`
|
||||
echo "docker run complete"
|
||||
|
||||
docker_acceptance_test_oraclelinux:
|
||||
name: Acceptance tests(Docker - OracleLinux)
|
||||
needs: [create_test_build,build_and_release_assets]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.ref }}
|
||||
|
||||
- name: Prepare for downloads
|
||||
id: prepare-for-downloads
|
||||
run: |
|
||||
mkdir ~/artifacts
|
||||
|
||||
- name: Download Linux Build Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build-artifact-linux
|
||||
path: ~/artifacts
|
||||
|
||||
- name: Extract Ubuntu Artifacts and Install Binary
|
||||
run: |
|
||||
mkdir ~/build
|
||||
tar -xf ~/artifacts/linux.tar.gz -C ~/build
|
||||
|
||||
- name: Copy binary
|
||||
run: |
|
||||
cp ~/build/steampipe tests/dockertesting/oraclelinux
|
||||
|
||||
- name: Build steampipe docker images
|
||||
run: |
|
||||
docker build -t sporacle tests/dockertesting/oraclelinux --build-arg TARGETBRANCH="${{ github.event.ref }}"
|
||||
docker images
|
||||
|
||||
- name: Create a container and run the test suite
|
||||
timeout-minutes: 15
|
||||
run: |
|
||||
docker run --name steampipe-oracle `docker images -q sporacle`
|
||||
echo "docker run complete"
|
||||
|
||||
create_release_tag:
|
||||
name: Tag Release
|
||||
|
||||
8
go.mod
8
go.mod
@@ -16,7 +16,7 @@ require (
|
||||
github.com/gertd/go-pluralize v0.2.1
|
||||
github.com/gin-contrib/static v0.0.1
|
||||
github.com/gin-gonic/gin v1.8.1
|
||||
github.com/go-git/go-git/v5 v5.5.1
|
||||
github.com/go-git/go-git/v5 v5.5.2
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2
|
||||
github.com/hashicorp/go-hclog v1.4.0
|
||||
@@ -29,7 +29,7 @@ require (
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.3
|
||||
github.com/karrick/gows v0.3.0
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible
|
||||
github.com/mattn/go-isatty v0.0.16
|
||||
github.com/mattn/go-isatty v0.0.17
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
|
||||
github.com/olekukonko/tablewriter v0.0.5
|
||||
github.com/opencontainers/image-spec v1.0.2
|
||||
@@ -99,7 +99,7 @@ require (
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
github.com/go-git/gcfg v1.5.0 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.3.1 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.4.0 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
@@ -200,7 +200,7 @@ require (
|
||||
go.opentelemetry.io/proto/otlp v0.16.0 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
|
||||
golang.org/x/sys v0.2.0 // indirect
|
||||
golang.org/x/sys v0.3.0 // indirect
|
||||
golang.org/x/term v0.2.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||
google.golang.org/api v0.102.0 // indirect
|
||||
|
||||
14
go.sum
14
go.sum
@@ -361,12 +361,13 @@ github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
|
||||
github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4=
|
||||
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
|
||||
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
|
||||
github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34=
|
||||
github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
|
||||
github.com/go-git/go-billy/v5 v5.4.0 h1:Vaw7LaSTRJOUric7pe4vnzBSgyuf2KrLsu2Y4ZpQBDE=
|
||||
github.com/go-git/go-billy/v5 v5.4.0/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.1 h1:y5z6dd3qi8Hl+stezc8p3JxDkoTRqMAlKnXHuzrfjTQ=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo=
|
||||
github.com/go-git/go-git/v5 v5.5.1 h1:5vtv2TB5PM/gPM+EvsHJ16hJh4uAkdGcKilcwY7FYwo=
|
||||
github.com/go-git/go-git/v5 v5.5.1/go.mod h1:uz5PQ3d0gz7mSgzZhSJToM6ALPaKCdSnl58/Xb5hzr8=
|
||||
github.com/go-git/go-git/v5 v5.5.2 h1:v8lgZa5k9ylUw+OR/roJHTxR4QItsNFI5nKtAXFuynw=
|
||||
github.com/go-git/go-git/v5 v5.5.2/go.mod h1:BE5hUJ5yaV2YMxhmaP4l6RBQ08kMxKSPD4BlxtH7OjI=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
@@ -789,8 +790,8 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd
|
||||
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
@@ -1446,8 +1447,9 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
|
||||
@@ -11,6 +11,12 @@ RUN adduser --system --disabled-login --ingroup 0 --gecos "steampipe user" --she
|
||||
# and others for running acceptance tests
|
||||
RUN apt-get update -y && apt-get install -y sudo wget git jq sed vim curl bc less
|
||||
|
||||
# copy jd binary to /usr/local/bin
|
||||
COPY jd-amd64-linux /usr/local/bin/jd
|
||||
|
||||
# add executable permissions to jd
|
||||
RUN chmod +x /usr/local/bin/jd
|
||||
|
||||
# copy steampipe binary from local folder
|
||||
COPY steampipe /usr/local/bin/
|
||||
|
||||
|
||||
BIN
tests/dockertesting/debian/jd-amd64-linux
Normal file
BIN
tests/dockertesting/debian/jd-amd64-linux
Normal file
Binary file not shown.
@@ -15,7 +15,7 @@ git checkout $1
|
||||
git branch
|
||||
|
||||
# declare the test file names
|
||||
declare -a arr=("migration" "service_and_plugin" "search_path" "chaos_and_query" "dynamic_schema" "cache" "mod_install" "mod" "check" "workspace" "cloud" "performance" "exit_codes")
|
||||
declare -a arr=("migration" "service_and_plugin" "search_path" "chaos_and_query" "dynamic_schema" "cache" "mod_install" "mod" "check" "cloud" "dashboard" "dashboard_parsing_validation" "performance" "exit_codes")
|
||||
declare -i failure_count=0
|
||||
|
||||
# run test suite
|
||||
|
||||
@@ -11,6 +11,12 @@ RUN adduser --system --shell /bin/false --uid 9193 --gid 0 --create-home steampi
|
||||
# interactive mode, and others for running acceptance tests
|
||||
RUN microdnf update -y && microdnf upgrade -y && microdnf install -y sudo findutils wget git jq sed vim curl bc tar less
|
||||
|
||||
# copy jd binary to /usr/bin
|
||||
COPY jd-amd64-linux /usr/bin/jd
|
||||
|
||||
# add executable permissions to jd
|
||||
RUN chmod +x /usr/bin/jd
|
||||
|
||||
# copy steampipe binary from local folder
|
||||
COPY steampipe /usr/bin/
|
||||
|
||||
|
||||
BIN
tests/dockertesting/oraclelinux/jd-amd64-linux
Normal file
BIN
tests/dockertesting/oraclelinux/jd-amd64-linux
Normal file
Binary file not shown.
@@ -15,7 +15,7 @@ git checkout $1
|
||||
git branch
|
||||
|
||||
# declare the test file names
|
||||
declare -a arr=("migration" "service_and_plugin" "search_path" "chaos_and_query" "dynamic_schema" "cache" "mod_install" "mod" "check" "workspace" "cloud" "performance" "exit_codes")
|
||||
declare -a arr=("migration" "service_and_plugin" "search_path" "chaos_and_query" "dynamic_schema" "cache" "mod_install" "mod" "check" "cloud" "dashboard" "dashboard_parsing_validation" "performance" "exit_codes")
|
||||
declare -i failure_count=0
|
||||
|
||||
# run test suite
|
||||
|
||||
Reference in New Issue
Block a user