Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 33 additions & 20 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
GOPRIVATE: "flant.internal"
PRIVATE_REPO: "${{secrets.DECKHOUSE_PRIVATE_REPO}}"
GOLANGCI_LINT_VERSION: 'v2.11.4'
GO_IMAGE: registry.deckhouse.io/container-factory@sha256:ce80d4ec2053430e81b1a07492a403c4fb5382a27570984318ea75b87bbe5109

permissions:
contents: write
Expand Down Expand Up @@ -39,7 +40,7 @@ jobs:
libssl-dev `# delivery-kit: OpenSSL crypto for signature verification (CGO)` \
libuv1-dev `# delivery-kit: async I/O for libuv-based networking (CGO)` \
libzstd-dev `# delivery-kit: zstd compression support (CGO)` \
file git gcc dnsutils
file git gcc dnsutils curl
# libuv1-dev ships static lib as libuv_a.a; the linker expects libuv.a
ln -fs "$(dpkg -L libuv1-dev | grep -F '/libuv_a.a')" /usr/local/lib/libuv.a

Expand All @@ -48,11 +49,14 @@ jobs:
with:
fetch-depth: 0 # To use `git describe --tags`

- name: Install Crane
uses: imjasonh/setup-crane@v0.7

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: false # Cache download takes longer that a build from scratch
run: |
crane export "$GO_IMAGE" - | tar -x -C / --no-same-owner usr/local/go
echo "/usr/local/go/bin" >> "$GITHUB_PATH"
/usr/local/go/bin/go version

- name: Setup Task
uses: arduino/setup-task@v2
Expand Down Expand Up @@ -113,7 +117,7 @@ jobs:
libssl-dev `# delivery-kit: OpenSSL crypto for signature verification (CGO)` \
libuv1-dev `# delivery-kit: async I/O for libuv-based networking (CGO)` \
libzstd-dev `# delivery-kit: zstd compression support (CGO)` \
file git gcc dnsutils
file git gcc dnsutils curl
# libuv1-dev ships static lib as libuv_a.a; the linker expects libuv.a
ln -fs "$(dpkg -L libuv1-dev | grep -F '/libuv_a.a')" /usr/local/lib/libuv.a

Expand All @@ -122,11 +126,14 @@ jobs:
with:
fetch-depth: 0 # To use `git describe --tags`

- name: Install Crane
uses: imjasonh/setup-crane@v0.7

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: false # Cache download takes longer that a build from scratch
run: |
crane export "$GO_IMAGE" - | tar -x -C / --no-same-owner usr/local/go
echo "/usr/local/go/bin" >> "$GITHUB_PATH"
/usr/local/go/bin/go version

- name: Setup Task
uses: arduino/setup-task@v2
Expand Down Expand Up @@ -183,7 +190,7 @@ jobs:
libssl-dev `# delivery-kit: OpenSSL crypto for signature verification (CGO)` \
libuv1-dev `# delivery-kit: async I/O for libuv-based networking (CGO)` \
libzstd-dev `# delivery-kit: zstd compression support (CGO)` \
file git gcc dnsutils
file git gcc dnsutils curl
# libuv1-dev ships static lib as libuv_a.a; the linker expects libuv.a
ln -fs "$(dpkg -L libuv1-dev | grep -F '/libuv_a.a')" /usr/local/lib/libuv.a

Expand All @@ -192,11 +199,14 @@ jobs:
with:
fetch-depth: 0 # To use `git describe --tags`

- name: Install Crane
uses: imjasonh/setup-crane@v0.7

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: false # Cache download takes longer that a build from scratch
run: |
crane export "$GO_IMAGE" - | tar -x -C / --no-same-owner usr/local/go
echo "/usr/local/go/bin" >> "$GITHUB_PATH"
/usr/local/go/bin/go version

- name: Setup GolangCI-Lint
uses: golangci/golangci-lint-action@v9
Expand Down Expand Up @@ -258,7 +268,7 @@ jobs:
libssl-dev `# delivery-kit: OpenSSL crypto for signature verification (CGO)` \
libuv1-dev `# delivery-kit: async I/O for libuv-based networking (CGO)` \
libzstd-dev `# delivery-kit: zstd compression support (CGO)` \
file git gcc dnsutils
file git gcc dnsutils curl
# libuv1-dev ships static lib as libuv_a.a; the linker expects libuv.a
ln -fs "$(dpkg -L libuv1-dev | grep -F '/libuv_a.a')" /usr/local/lib/libuv.a

Expand All @@ -267,11 +277,14 @@ jobs:
with:
fetch-depth: 0 # To use `git describe --tags`

- name: Install Crane
uses: imjasonh/setup-crane@v0.7

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
cache: false # Cache download takes longer that a build from scratch
run: |
crane export "$GO_IMAGE" - | tar -x -C / --no-same-owner usr/local/go
echo "/usr/local/go/bin" >> "$GITHUB_PATH"
/usr/local/go/bin/go version

- name: Setup Task
uses: arduino/setup-task@v2
Expand Down
10 changes: 6 additions & 4 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ vars:
version="$(go list -m -f '{{"{{"}}.Replace.Version{{"}}"}}' github.com/werf/werf/v2)"
echo "-X 'github.com/werf/werf/v2/pkg/werf.Version=${version}'"

cgoTags: "clionly dfrunsecurity dfrunnetwork dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build cni"
goTags: "clionly dfrunsecurity dfrunnetwork dfrunmount dfssh containers_image_openpgp"
cgoTags: "gost clionly dfrunsecurity dfrunnetwork dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build cni"
goTags: "gost clionly dfrunsecurity dfrunnetwork dfrunmount dfssh containers_image_openpgp"
cgoDevTags: "clionly dfrunsecurity dfrunnetwork dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build cni"
goDevTags: "clionly dfrunsecurity dfrunnetwork dfrunmount dfssh containers_image_openpgp"
testsumFormat: '{{if eq .GITHUB_ACTIONS "true"}}github-actions{{else}}pkgname-and-test-fails{{end}}'

cgoDevLDFlags: "-linkmode external -extldflags=-static -s -w -X 'github.com/deckhouse/deckhouse-cli/internal/version.Version=local-dev' {{ .werfLDFlags }}"
Expand All @@ -66,7 +68,7 @@ tasks:
internal: true
cmds:
- go build -o "{{ .outputDir | default (printf "./build/%s-%s" .targetOS .targetArch) }}/bin/d8"
-compiler gc -ldflags="{{ .cgoDevLDFlags }}" -tags="{{ .cgoTags }}" {{ .CLI_ARGS }} ./cmd/d8/
-compiler gc -ldflags="{{ .cgoDevLDFlags }}" -tags="{{ .cgoDevTags }}" {{ .CLI_ARGS }} ./cmd/d8/
env:
CGO_ENABLED: "1"
GOOS: "{{ .targetOS }}"
Expand All @@ -86,7 +88,7 @@ tasks:
internal: true
cmds:
- go build -o "{{ .outputDir | default (printf "./build/%s-%s" .targetOS .targetArch) }}/bin/d8{{ if (eq .targetOS "windows") }}.exe{{ end }}"
-ldflags="{{ .goDevLDFlags }}" -tags="{{ .goTags }}" {{ .CLI_ARGS }} ./cmd/d8/
-ldflags="{{ .goDevLDFlags }}" -tags="{{ .goDevTags }}" {{ .CLI_ARGS }} ./cmd/d8/
env:
CGO_ENABLED: "0"
GOOS: "{{ .targetOS }}"
Expand Down
Loading
Loading