Skip to content

Commit

Permalink
CNJR-5882: Fix goreleaser config deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
szh committed Dec 18, 2024
1 parent b2c0274 commit 41cad9b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
before:
hooks:
- ./bin/go_mod_tidy # Get dependencies
Expand Down Expand Up @@ -156,7 +157,7 @@ brews:
bin.install "secretless-broker"
test: |
system "#{bin}/secretless-broker", "-version"
tap:
repository:
owner: cyberark
name: homebrew-tools
skip_upload: true
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ pipeline {
infrapool.agentPut from: """${WORKSPACE}/pristine-checkout""", to: """$WORKSPACE/"""
infrapool.agentSh 'git submodule update --init --recursive'
// Create release packages without releasing to Github
infrapool.agentSh "./bin/build_release --skip-validate"
infrapool.agentSh "./bin/build_release --skip=validate"
infrapool.agentArchiveArtifacts artifacts: 'dist/goreleaser/'
}
}
Expand Down
2 changes: 1 addition & 1 deletion bin/build_release
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ REPO_ROOT="$(git rev-parse --show-toplevel)"
GO_VERSION="v$(grep "^\bgo\b" "${REPO_ROOT}/go.mod" | awk '{print $2}')"

# Determine where VERSION file is based on goreleaser argument
if [[ "$1" == '--skip-validate' ]]; then
if [[ "$1" == '--skip=validate' ]]; then
VERSION=$(<"${REPO_ROOT}/../VERSION")
else
VERSION=$(<"${REPO_ROOT}/VERSION")
Expand Down
4 changes: 4 additions & 0 deletions bin/check_golang_security
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ else
# Running in Jenkins
excluded_directories="${toplevel_dir}/test,${toplevel_dir}/third_party/go-mssqldb"
echo "Excluding directories: ${excluded_directories}"
# TODO: Somehow this still fails to exclude them.
# Excluding directories: /home/jenkins/agent/workspace/secretless-broker-main-full_main/test,/home/jenkins/agent/workspace/secretless-broker-main-full_main/third_party/go-mssqldb
# later...
# Import directory: /home/jenkins/agent/workspace/secretless-broker-main-full_main/secretless-broker-main-full_main/third_party/go-mssqldb/examples/tsql
go install github.com/securego/gosec/v2/cmd/gosec@latest
git config --global --add safe.directory "${WORKSPACE}"
./bin/run_gosec -c "${confidence}" -s "${severity}" -b "${current_branch}" -e "${excluded_directories}"
Expand Down

0 comments on commit 41cad9b

Please sign in to comment.