Skip to content

Commit

Permalink
Merge pull request #42 from CptOfEvilMinions/initial-cicd
Browse files Browse the repository at this point in the history
Update build pipeline - 11
  • Loading branch information
CptOfEvilMinions authored Dec 28, 2021
2 parents c40ec1c + d1076b2 commit 3bcd656
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 33 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ jobs:
- name: Upload osctrl bianries
uses: actions/upload-artifact@v2
with:
#name: osctrl-${{ matrix.components }}-${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.sha_short }}-${{ matrix.goos }}-${{ matrix.goarch }}
name: osctrl-${{ matrix.components }}-${{ matrix.goos }}-${{ matrix.goarch }}
name: osctrl-${{ matrix.components }}-${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.sha_short }}-${{ matrix.goos }}-${{ matrix.goarch }}
path: ./bin/osctrl-${{ matrix.components }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin

- name: Create ZIP of build artifacts
Expand Down
62 changes: 31 additions & 31 deletions .github/workflows/tagged-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,36 @@ on:
- 'v*'

jobs:
# build_and_test:
# runs-on: ubuntu-20.04
# strategy:
# matrix:
# components: ['tls', 'admin', 'api', 'cli']
# goos: ['linux']
# goarch: ['amd64']
# steps:
# ######################################## Checkout code ########################################
# - name: Checkout code
# uses: actions/checkout@v2
# ######################################## Install go ########################################
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: 1.17
# - run: go version
# ######################################## Get GO deps ########################################
# - name: Get GO deps
# run: go mod download
# ######################################## Build osctrl binaries ########################################
# - name: Build osctrl-tls
# run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ./bin/osctrl-${{ matrix.components }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin ./${{ matrix.components }}
# ######################################## Upload artifacts ########################################
# - name: Upload osctrl bianries
# uses: actions/upload-artifact@v2
# with:
# name: osctrl-${{ matrix.components }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin
# path: ./bin/osctrl-${{ matrix.components }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin
build_and_test:
runs-on: ubuntu-20.04
strategy:
matrix:
components: ['tls', 'admin', 'api', 'cli']
goos: ['linux']
goarch: ['amd64']
steps:
######################################## Checkout code ########################################
- name: Checkout code
uses: actions/checkout@v2
######################################## Install go ########################################
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- run: go version
######################################## Get GO deps ########################################
- name: Get GO deps
run: go mod download
######################################## Build osctrl binaries ########################################
- name: Build osctrl-tls
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ./bin/osctrl-${{ matrix.components }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin ./${{ matrix.components }}
######################################## Upload artifacts ########################################
- name: Upload osctrl bianries
uses: actions/upload-artifact@v2
with:
name: osctrl-${{ matrix.components }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin
path: ./bin/osctrl-${{ matrix.components }}-${{ matrix.goos }}-${{ matrix.goarch }}.bin

release:
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -64,8 +65,7 @@ jobs:
- name: Download osctrl binaries
uses: actions/download-artifact@v2
with:
#name: osctrl-${{ matrix.components }}-master-${{ steps.vars.outputs.pr_commit }}-${{ matrix.goos }}-${{ matrix.goarch }}
name: osctrl-${{ matrix.components }}-${{ matrix.goos }}-${{ matrix.goarch }}
name: osctrl-${{ matrix.components }}-master-${{ steps.vars.outputs.pr_commit }}-${{ matrix.goos }}-${{ matrix.goarch }}

- name: Rename binaries
run: |
Expand Down

0 comments on commit 3bcd656

Please sign in to comment.