Skip to content

Commit

Permalink
Merge pull request #6 from Ajpantuso/ci_enhancements
Browse files Browse the repository at this point in the history
Refactoring CI
  • Loading branch information
Ajpantuso authored Mar 7, 2022
2 parents 5e5cf70 + 705c24e commit bba4b1c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ changelog:
order: 999
filters:
exclude:
- Merge pull request
- '^docs:'
- '^test:'
9 changes: 2 additions & 7 deletions build_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

set -exvo pipefail -o nounset

# utilize local go 1.17 version if available
GO_1_17="/opt/go/1.17.5/bin"
source "${PWD}/cicd/jenkins_env.sh"

if [ -d "${GO_1_17}" ]; then
PATH="${GO_1_17}:${PATH}"
fi

echo "$(curl -sL https://git.io/goreleaser) --rm-dist" | bash
./mage release
8 changes: 8 additions & 0 deletions cicd/jenkins_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# utilize local go 1.17 version if available
GO_1_17="/opt/go/1.17.7/bin"

if [ -d "${GO_1_17}" ]; then
PATH="${GO_1_17}:${PATH}"
fi
3 changes: 2 additions & 1 deletion magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var Aliases = map[string]interface{}{
"clean": All.Clean,
"test": All.Test,
"install": Build.Install,
"release": Release.Full,
}

type All mg.Namespace
Expand Down Expand Up @@ -238,7 +239,7 @@ func (Release) Full() error {
Release.Clean,
)

return sh.Run(path.Join(_depBin, "goreleaser"), "release")
return sh.Run(path.Join(_depBin, "goreleaser"), "release", "--rm-dist")
}

// Generates release artifacts locally.
Expand Down
10 changes: 2 additions & 8 deletions pr_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

set -exvo pipefail -o nounset

# utilize local go 1.17 version if available
GO_1_17="/opt/go/1.17.5/bin"
source "${PWD}/cicd/jenkins_env.sh"

if [ -d "${GO_1_17}" ]; then
PATH="${GO_1_17}:${PATH}"
fi

./mage -t 10m check
./mage -t 10m test
./mage -t 10m check && ./mage -t 10m test

0 comments on commit bba4b1c

Please sign in to comment.