Skip to content

Commit

Permalink
Test Docker Push
Browse files Browse the repository at this point in the history
  • Loading branch information
shovnik committed Dec 16, 2020
1 parent fe4c8b7 commit 28b450e
Showing 1 changed file with 8 additions and 31 deletions.
39 changes: 8 additions & 31 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
key: go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
- name: Run Unit tests
run: go test ./...
- name: GitHub issue generator
- name: GitHub Issue Generator
if: ${{ failure() && github.ref == 'ref/head/master' }}
run: |
go run cmd/issuegenerator/main.go $TEST_RESULTS
Expand Down Expand Up @@ -92,7 +92,6 @@ jobs:
uses: actions/download-artifact@v2
with:
name: tool-binaries
path: /home/runner/go/bin
- name: Extract Tool Binaries Archive
run: tar -xvf tool-bin.tar -C /
- name: Lint
Expand Down Expand Up @@ -126,7 +125,6 @@ jobs:
uses: actions/download-artifact@v2
with:
name: tool-binaries
path: /home/runner/go/bin
- name: Extract Tool Binaries Archive
run: tar -xvf tool-bin.tar -C /
- name: Build Collector for All Architectures
Expand Down Expand Up @@ -209,7 +207,6 @@ jobs:
uses: actions/download-artifact@v2
with:
name: tool-binaries
path: /home/runner/go/bin
- name: Extract Tool Binaries Archive
run: tar -xvf tool-bin.tar -C /
- name: Install fluentbit
Expand Down Expand Up @@ -264,7 +261,6 @@ jobs:
uses: actions/download-artifact@v2
with:
name: tool-binaries
path: /home/runner/go/bin
- name: Extract Tool Binaries Archive
run: tar -xvf tool-bin.tar -C /
- name: Loadtest
Expand All @@ -281,6 +277,8 @@ jobs:
matrix:
package_type: ["deb", "rpm"]
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
Expand Down Expand Up @@ -408,40 +406,19 @@ jobs:
run: chmod -R +x ./dist
- name: Verify Distribution Files Exist
id: check
run: |
files=(
'bin/otelcol_darwin_amd64'
'bin/otelcol_linux_arm64'
'bin/otelcol_linux_amd64'
'bin/otelcol_windows_amd64.exe'
'dist/otel-collector-*arm64.rpm'
'dist/otel-collector_*amd64.deb'
'dist/otel-collector-*x86_64.rpm'
'dist/otel-collector_*arm64.deb'
'dist/otel-collector-*amd64.msi'
);
for f in "${files[@]}"
do
if [[ ! -f $f ]]
then
echo "$f does not exist."
echo "::set-output name=passed::false"
exit 0
fi
done
echo "::set-output name=passed::true"
run: ./.github/workflows/scripts/verify-dist-files-exist.sh
- name: Build Docker Image
if: ${{ steps.check.outputs.passed }}
run: |
make docker-otelcol
docker tag otelcol:latest otel/opentelemetry-collector-dev:$GITHUB_SHA
docker tag otelcol:latest otel/opentelemetry-collector-dev:latest
docker tag otelcol:latest shovnik/deploy-test:$GITHUB_SHA
docker tag otelcol:latest shovnik/deploy-test:latest
- name: Push Docker Image
if: ${{ steps.check.outputs.passed }}
run: |
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker push otel/opentelemetry-collector-dev:$GITHUB_SHA
docker push otel/opentelemetry-collector-dev:latest
docker push shovnik/deploy-test:$GITHUB_SHA
docker push shovnik/deploy-test:latest
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD}}
Expand Down

0 comments on commit 28b450e

Please sign in to comment.