Skip to content

Commit

Permalink
use GA images
Browse files Browse the repository at this point in the history
  • Loading branch information
divolgin committed Nov 5, 2020
1 parent 3d22845 commit 836d80c
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 36 deletions.
77 changes: 43 additions & 34 deletions .github/workflows/build-test-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ on:
jobs:
build:
runs-on: ubuntu-18.04
container:
image: replicated/troubleshoot-builder:18.04
credentials:
username: repldeploy2
password: ${{ secrets.DOCKERHUB_PASSWORD }}
# container:
# image: replicated/troubleshoot-builder:18.04
# credentials:
# username: repldeploy2
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
steps:
- uses: actions/setup-go@v1
with:
Expand All @@ -29,15 +29,15 @@ jobs:

- uses: actions/checkout@v2

- run: make
- run: make ga-deps test

compile-preflight:
runs-on: ubuntu-latest
container:
image: replicated/troubleshoot-builder:18.04
credentials:
username: repldeploy2
password: ${{ secrets.DOCKERHUB_PASSWORD }}
runs-on: ubuntu-18.04
# container:
# image: replicated/troubleshoot-builder:18.04
# credentials:
# username: repldeploy2
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
needs: build
steps:
- uses: actions/setup-go@v1
Expand All @@ -49,19 +49,19 @@ jobs:
echo "::add-path::$(go env GOPATH)/bin"
shell: bash
- uses: actions/checkout@master
- run: make preflight
- run: make ga-deps preflight
- uses: actions/upload-artifact@v1
with:
name: preflight
path: bin/preflight

validate-preflight:
runs-on: ubuntu-latest
container:
image: replicated/troubleshoot-builder:18.04
credentials:
username: repldeploy2
password: ${{ secrets.DOCKERHUB_PASSWORD }}
runs-on: ubuntu-18.04
# container:
# image: replicated/troubleshoot-builder:18.04
# credentials:
# username: repldeploy2
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
needs: compile-preflight
steps:
- name: Download preflight binary
Expand All @@ -70,16 +70,18 @@ jobs:
name: preflight
path: bin/
- uses: engineerd/setup-kind@v0.4.0
- run: sudo apt-get -y update
- run: sudo apt-get install --no-install-recommends -y libc6 libc-bin
- run: chmod +x bin/preflight
- run: ./bin/preflight --interactive=false --format=json https://preflight.replicated.com

compile-supportbundle:
runs-on: ubuntu-latest
container:
image: replicated/troubleshoot-builder:18.04
credentials:
username: repldeploy2
password: ${{ secrets.DOCKERHUB_PASSWORD }}
runs-on: ubuntu-18.04
# container:
# image: replicated/troubleshoot-builder:18.04
# credentials:
# username: repldeploy2
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
needs: build
steps:
- uses: actions/setup-go@v1
Expand All @@ -91,14 +93,14 @@ jobs:
echo "::add-path::$(go env GOPATH)/bin"
shell: bash
- uses: actions/checkout@master
- run: make support-bundle
- run: make ga-deps support-bundle
- uses: actions/upload-artifact@v1
with:
name: support-bundle
path: bin/support-bundle

validate-supportbundle:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
needs: compile-supportbundle
steps:
- uses: actions/checkout@v1
Expand All @@ -108,18 +110,22 @@ jobs:
name: support-bundle
path: bin/
- uses: engineerd/setup-kind@v0.4.0
- run: dpkg -l | grep libc
- run: sudo apt-get -y update
- run: sudo apt-get install --no-install-recommends -y libc6 libc-bin
- run: dpkg -l | grep libc
- run: chmod +x bin/support-bundle
- run: ./bin/support-bundle ./examples/support-bundle/sample-collectors.yaml
- run: ./bin/support-bundle ./examples/support-bundle/sample-supportbundle.yaml
- run: ./bin/support-bundle https://kots.io

goreleaser:
runs-on: ubuntu-latest
container:
image: replicated/troubleshoot-builder:18.04
credentials:
username: repldeploy2
password: ${{ secrets.DOCKERHUB_PASSWORD }}
runs-on: ubuntu-18.04
# container:
# image: replicated/troubleshoot-builder:18.04
# credentials:
# username: repldeploy2
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
needs:
- validate-preflight
if: startsWith(github.ref, 'refs/tags/v')
Expand All @@ -134,7 +140,10 @@ jobs:

- name: Unshallow
run: git fetch --prune --unshallow


- name: Deps
run: make ga-deps

- uses: actions/setup-go@v1
with:
go-version: "1.14"
Expand Down
24 changes: 23 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ snapshot-release:

.PHONY: local-release
local-release:
curl -sL https://git.io/goreleaser | bash -s -- --rm-dist --snapshot --config deploy/.goreleaser.local.yml
curl -sL https://git.io/goreleaser | bash -s -- --rm-dist --snapshot --config deploy/.goreleaser.yaml
docker tag replicated/troubleshoot:alpha localhost:32000/troubleshoot:alpha
docker tag replicated/preflight:alpha localhost:32000/preflight:alpha
docker push localhost:32000/troubleshoot:alpha
Expand All @@ -136,3 +136,25 @@ run-troubleshoot: support-bundle
.PHONY: run-analyze
run-analyze: analyze
./bin/analyze --analyzers ./examples/support-bundle/sample-analyzers.yaml ./support-bundle.tar.gz

.PHONY: ga-deps
ga-deps:
sudo apt-get -y update
sudo apt-get install --no-install-recommends -y \
ca-certificates \
build-essential \
pkg-config \
librrd-dev \
libglib2.0-dev \
libcairo2-dev \
libpango1.0-dev \
libpixman-1-dev \
libpng-dev \
libsdl-pango-dev \
libthai-dev \
libpcre3-dev \
libssl-dev \
libffi-dev \
libdbi-dev \
libc6 \
libc-bin
2 changes: 1 addition & 1 deletion pkg/analyze/text_analyze_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func Test_textAnalyze(t *testing.T) {
for _, v := range actual {
unPointered = append(unPointered, *v)
}
assert.Equal(t, test.expectResult, unPointered)
assert.ElementsMatch(t, test.expectResult, unPointered)
})
}
}
Expand Down

0 comments on commit 836d80c

Please sign in to comment.