Skip to content

Commit

Permalink
add new var for goversion, remove aws, sync-automation enabled toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
ermirizio committed Jul 3, 2023
1 parent a2dc208 commit d3b824b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ policy:
# is used for selecting the appropriate golang-cross image
# used for building the binary, packages and docker images.
goversion: 1.19-bullseye
cleangoversion: 1.19
# Workflows that need to pass to merge PRs
tests:
- "Go 1.19.x Redis 5"
Expand Down
2 changes: 2 additions & 0 deletions policy/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func GetRepoPolicy(repo string, branch string) (RepoPolicy, error) {
// branchVals contains the parameters that are specific to a particular branch in a repo
type branchVals struct {
GoVersion string
CleanGoVersion string
Cgo bool
ConfigFile string
VersionPackage string // The package containing version.go
Expand Down Expand Up @@ -51,6 +52,7 @@ type Policies struct {
Binary string
Protected []string `copier:"-"`
Goversion string
CleanGoVersion string
Default string // The default git branch(master/main/anything else)
Repos map[string]Policies // map of reponames to branchPolicies
Ports map[string][]string
Expand Down
1 change: 0 additions & 1 deletion policy/templates/releng/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ jobs:
{{- template "goreleaser" . }}
{{- template "ci" . }}
{{- template "tests" . }}
{{- template "aws" . }}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
debvers: 'ubuntu/xenial ubuntu/bionic debian/jessie'
{{- end }}
- golang_cross: {{ .Branchvals.GoVersion }}
go_version: {{ .Branchvals.CleanGoVersion }}
goreleaser: 'ci/goreleaser/goreleaser.yml'
{{- if .Branchvals.Cgo }}
rpmvers: 'el/8 el/9 amazon/2023'
Expand Down Expand Up @@ -114,7 +115,7 @@

- uses: goreleaser/goreleaser-action@v4
with:
version: latest
version: 1.18.2
args: release --clean -f ${{`{{ matrix.goreleaser }}`}} ${{`{{ !startsWith(github.ref, 'refs/tags/') && ' --snapshot' || '' }}`}}
env:
GITHUB_TOKEN: ${{`{{ secrets.GITHUB_TOKEN }}`}}
Expand All @@ -126,11 +127,15 @@
NFPM_PAYG_PASSPHRASE: ${{`{{ secrets.SIGNING_KEY_PASSPHRASE }}`}}
GPG_FINGERPRINT: 12B5D62C28F57592D1575BD51ED14C59E37DAC20
PKG_SIGNING_KEY: ${{`{{ secrets.SIGNING_KEY }}`}}
GO_VERSION: ${{`{{ matrix.go_version }}`}}
GOLANG_CROSS: ${{`{{ matrix.golang_cross }}`}}
DEBVERS: ${{`{{ matrix.debvers }}`}}
RPMVERS: ${{`{{ matrix.rpmvers }}`}}
PACKAGECLOUD_TOKEN: ${{`{{ secrets.PACKAGECLOUD_TOKEN }}`}}

{{- if eq .Name "tyk" }}
DOCKER_CLI_EXPERIMENTAL: "enabled"

{{- end }}
- uses: actions/upload-artifact@v3
with:
name: deb
Expand Down
4 changes: 4 additions & 0 deletions policy/templates/sync/.github/workflows/sync-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ on:
- {{ $file }}
{{- end }}

env:
AUTOMERGE: false

jobs:
sync:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -116,6 +119,7 @@ jobs:
- name: Enable automerge for the created PR
id: enable-automerge
if: ${{ env.AUTOMERGE == 'true' }}
run: |
gh pr merge $PULL --auto --squash --subject "[CI] Sync automation: Syncing commits from master" --body "Picking CI changes from the commit $COMMIT"
env:
Expand Down

0 comments on commit d3b824b

Please sign in to comment.