Skip to content

Commit 88afc76

Browse files
authored
[deckhouse-tools] build fix (#12290)
Signed-off-by: borg-z <[email protected]>
1 parent 6f848a7 commit 88afc76

File tree

13 files changed

+52
-67
lines changed

13 files changed

+52
-67
lines changed

.github/ci_includes/werf_envs.yml

-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ CLOUD_PROVIDERS_SOURCE_REPO: "${{secrets.CLOUD_PROVIDERS_SOURCE_REPO}}"
2222
GOPROXY: "${{vars.GOPROXY}}"
2323
# observability source repo should contain creds for repo for ex https://user:[email protected]/group
2424
OBSERVABILITY_SOURCE_REPO: "${{secrets.OBSERVABILITY_SOURCE_REPO}}"
25-
# Next two are required for accessing the stronghold repo during d8 cli builds.
26-
# Stronghold pull token should contain CI token with read access to stronghold repos.
27-
STRONGHOLD_PULL_TOKEN: "${{secrets.STRONGHOLD_PULL_TOKEN}}"
28-
# deckhouse private repo should contain the host address of proprietary parts of deckhouse ecosystem. Ex repo.my-repo.com
2925
DECKHOUSE_PRIVATE_REPO: "${{secrets.DECKHOUSE_PRIVATE_REPO}}"
3026
# </template: git_source_envs>
3127
{!{- end -}!}

.github/workflows/build-and-test_dev.yml

-4
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ env:
4545
GOPROXY: "${{vars.GOPROXY}}"
4646
# observability source repo should contain creds for repo for ex https://user:[email protected]/group
4747
OBSERVABILITY_SOURCE_REPO: "${{secrets.OBSERVABILITY_SOURCE_REPO}}"
48-
# Next two are required for accessing the stronghold repo during d8 cli builds.
49-
# Stronghold pull token should contain CI token with read access to stronghold repos.
50-
STRONGHOLD_PULL_TOKEN: "${{secrets.STRONGHOLD_PULL_TOKEN}}"
51-
# deckhouse private repo should contain the host address of proprietary parts of deckhouse ecosystem. Ex repo.my-repo.com
5248
DECKHOUSE_PRIVATE_REPO: "${{secrets.DECKHOUSE_PRIVATE_REPO}}"
5349
# </template: git_source_envs>
5450

.github/workflows/build-and-test_pre-release.yml

-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ env:
4747
GOPROXY: "${{vars.GOPROXY}}"
4848
# observability source repo should contain creds for repo for ex https://user:[email protected]/group
4949
OBSERVABILITY_SOURCE_REPO: "${{secrets.OBSERVABILITY_SOURCE_REPO}}"
50-
# Next two are required for accessing the stronghold repo during d8 cli builds.
51-
# Stronghold pull token should contain CI token with read access to stronghold repos.
52-
STRONGHOLD_PULL_TOKEN: "${{secrets.STRONGHOLD_PULL_TOKEN}}"
53-
# deckhouse private repo should contain the host address of proprietary parts of deckhouse ecosystem. Ex repo.my-repo.com
5450
DECKHOUSE_PRIVATE_REPO: "${{secrets.DECKHOUSE_PRIVATE_REPO}}"
5551
# </template: git_source_envs>
5652

.github/workflows/build-and-test_release.yml

-4
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ env:
6060
GOPROXY: "${{vars.GOPROXY}}"
6161
# observability source repo should contain creds for repo for ex https://user:[email protected]/group
6262
OBSERVABILITY_SOURCE_REPO: "${{secrets.OBSERVABILITY_SOURCE_REPO}}"
63-
# Next two are required for accessing the stronghold repo during d8 cli builds.
64-
# Stronghold pull token should contain CI token with read access to stronghold repos.
65-
STRONGHOLD_PULL_TOKEN: "${{secrets.STRONGHOLD_PULL_TOKEN}}"
66-
# deckhouse private repo should contain the host address of proprietary parts of deckhouse ecosystem. Ex repo.my-repo.com
6763
DECKHOUSE_PRIVATE_REPO: "${{secrets.DECKHOUSE_PRIVATE_REPO}}"
6864
# </template: git_source_envs>
6965

.werf/defines/modules.tmpl

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ args:
2525
SOURCE_REPO: {{ .SOURCE_REPO }}
2626
CLOUD_PROVIDERS_SOURCE_REPO: {{ .CLOUD_PROVIDERS_SOURCE_REPO }}
2727
OBSERVABILITY_SOURCE_REPO: {{ .OBSERVABILITY_SOURCE_REPO }}
28-
STRONGHOLD_PULL_TOKEN: {{ .STRONGHOLD_PULL_TOKEN }}
2928
DECKHOUSE_PRIVATE_REPO: {{ .DECKHOUSE_PRIVATE_REPO }}
3029
# proxies for various packages
3130
GOPROXY: {{ .GOPROXY }}

.werf/werf-modules.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
{{- $_ := set $ctx "OBSERVABILITY_SOURCE_REPO" $Root.OBSERVABILITY_SOURCE_REPO }}
5757
{{- $_ := set $ctx "GOPROXY" $Root.GOPROXY }}
5858
{{- $_ := set $ctx "DECKHOUSE_PRIVATE_REPO" $Root.DECKHOUSE_PRIVATE_REPO }}
59-
{{- $_ := set $ctx "STRONGHOLD_PULL_TOKEN" $Root.STRONGHOLD_PULL_TOKEN }}
6059
{{- $_ := set $ctx "DistroPackagesProxy" $Root.DistroPackagesProxy }}
6160
{{- $_ := set $ctx "CargoProxy" $Root.CargoProxy }}
6261
---

Makefile

+1-4
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,7 @@ set-build-envs:
378378
ifeq ($(DECKHOUSE_PRIVATE_REPO),)
379379
export DECKHOUSE_PRIVATE_REPO=https://github.com
380380
endif
381-
ifeq ($(STRONGHOLD_PULL_TOKEN=),)
382-
export STRONGHOLD_PULL_TOKEN="token"
383-
endif
384-
381+
385382
export WERF_REPO=$(DEV_REGISTRY_PATH)
386383
export REGISTRY_SUFFIX=$(shell echo $(WERF_ENV) | tr '[:upper:]' '[:lower:]')
387384
export SECONDARY_REPO=--secondary-repo $(DECKHOUSE_REGISTRY_HOST)/deckhouse/$(REGISTRY_SUFFIX)

candi/version_map.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
bashible: &bashible
22
ubuntu:
3-
'18.04':
4-
'20.04':
5-
'22.04':
6-
'24.04':
3+
"18.04":
4+
"20.04":
5+
"22.04":
6+
"24.04":
77
debian:
8-
'10':
9-
'11':
10-
'12':
8+
"10":
9+
"11":
10+
"12":
1111
centos:
12-
'7':
13-
'8':
14-
'9':
12+
"7":
13+
"8":
14+
"9":
1515
opensuse:
16-
'15.4':
17-
'15.5':
18-
'15.6':
16+
"15.4":
17+
"15.5":
18+
"15.6":
1919
k8s:
20-
'1.28':
20+
"1.28":
2121
status: end-of-life
2222
patch: 15
2323
bashible: *bashible
@@ -41,7 +41,7 @@ k8s:
4141
registrar: v2.13.0
4242
snapshotter: v8.1.1
4343
livenessprobe: v2.15.0
44-
'1.29':
44+
"1.29":
4545
status: available
4646
patch: 14
4747
bashible: *bashible
@@ -65,7 +65,7 @@ k8s:
6565
registrar: v2.13.0
6666
snapshotter: v8.1.1
6767
livenessprobe: v2.15.0
68-
'1.30':
68+
"1.30":
6969
status: available
7070
patch: 10
7171
bashible: *bashible
@@ -89,7 +89,7 @@ k8s:
8989
registrar: v2.13.0
9090
snapshotter: v8.1.1
9191
livenessprobe: v2.15.0
92-
'1.31':
92+
"1.31":
9393
status: available
9494
patch: 6
9595
bashible: *bashible
@@ -113,7 +113,7 @@ k8s:
113113
registrar: v2.13.0
114114
snapshotter: v8.1.1
115115
livenessprobe: v2.15.0
116-
'1.32':
116+
"1.32":
117117
status: preview
118118
patch: 2
119119
bashible: *bashible
@@ -138,6 +138,6 @@ k8s:
138138
snapshotter: v8.1.1
139139
livenessprobe: v2.15.0
140140
d8:
141-
d8CliVersion: v0.10.4
141+
d8CliVersion: v0.11.0
142142
jq:
143143
version: 1.7.1

modules/007-registrypackages/images/d8/werf.inc.yaml

+8-3
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,15 @@ shell:
5252
- apt-get update && apt-get install libbtrfs-dev -y
5353
install:
5454
- export GOPROXY={{ $.GOPROXY }}
55+
5556
- export PRIVATE_REPO={{ $.DECKHOUSE_PRIVATE_REPO }}
56-
- export PRIVATE_REPO_TOKEN={{ $.STRONGHOLD_PULL_TOKEN }}
57-
- export GOPRIVATE={{ $.DECKHOUSE_PRIVATE_REPO }}
58-
- git config --global url."https://gitlab-ci-token:${PRIVATE_REPO_TOKEN}@${PRIVATE_REPO}/".insteadOf https://${PRIVATE_REPO}/
57+
- GOPRIVATE="flant.internal"
58+
- git config --global url."ssh://git@${PRIVATE_REPO}/".insteadOf "https://flant.internal/"
59+
- git config --global --add safe.directory '*'
60+
- mkdir -p ~/.ssh
61+
- touch ~/.ssh/known_hosts
62+
- ssh-keyscan -H ${PRIVATE_REPO} >> ~/.ssh/known_hosts
63+
5964
- cd /src/deckhouse-cli
6065
- task build:dist:linux:amd64
6166
- mv ./dist/{{ .CandiVersionMap.d8.d8CliVersion }}/linux-amd64/bin/d8 /d8

modules/800-deckhouse-tools/images/web/werf.inc.yaml

+8-3
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,15 @@ shell:
6969
- find /var/lib/apt/ /var/cache/apt/ -type f -delete
7070
install:
7171
- export GOPROXY={{ $.GOPROXY }}
72+
7273
- export PRIVATE_REPO={{ $.DECKHOUSE_PRIVATE_REPO }}
73-
- export PRIVATE_REPO_TOKEN={{ $.STRONGHOLD_PULL_TOKEN }}
74-
- export GOPRIVATE={{ $.DECKHOUSE_PRIVATE_REPO }}
75-
- git config --global url."https://gitlab-ci-token:${PRIVATE_REPO_TOKEN}@${PRIVATE_REPO}/".insteadOf https://${PRIVATE_REPO}/
74+
- GOPRIVATE="flant.internal"
75+
- git config --global url."ssh://git@${PRIVATE_REPO}/".insteadOf "https://flant.internal/"
76+
- git config --global --add safe.directory '*'
77+
- mkdir -p ~/.ssh
78+
- touch ~/.ssh/known_hosts
79+
- ssh-keyscan -H ${PRIVATE_REPO} >> ~/.ssh/known_hosts
80+
7681
- cd /src
7782
- task build:dist:all
7883
- mkdir -p /app/files/d8-cli

tools/images_tags/main.go

-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ func main() {
8383
"GOPROXY=",
8484
"CLOUD_PROVIDERS_SOURCE_REPO=",
8585
"OBSERVABILITY_SOURCE_REPO=",
86-
"STRONGHOLD_PULL_TOKEN=",
8786
"DECKHOUSE_PRIVATE_REPO=",
8887
)
8988
cmd.Dir = path.Join("..")

werf-giterminism.yaml

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
giterminismConfigVersion: 1
22
config:
3-
goTemplateRendering: # The rules for the Go-template functions
4-
allowEnvVariables:
5-
- /CI_.+/
6-
- /REPO_MCM_.+/
7-
- SOURCE_REPO
8-
- GOPROXY
9-
- WERF_DISABLE_META_TAGS
10-
- CLOUD_PROVIDERS_SOURCE_REPO
11-
- OBSERVABILITY_SOURCE_REPO
12-
- DISTRO_PACKAGES_PROXY
13-
- CARGO_PROXY
14-
- STRONGHOLD_PULL_TOKEN
15-
- DECKHOUSE_PRIVATE_REPO
16-
allowUncommittedFiles: [ "tools/build_includes/*" ]
3+
goTemplateRendering: # The rules for the Go-template functions
4+
allowEnvVariables:
5+
- /CI_.+/
6+
- /REPO_MCM_.+/
7+
- SOURCE_REPO
8+
- GOPROXY
9+
- WERF_DISABLE_META_TAGS
10+
- CLOUD_PROVIDERS_SOURCE_REPO
11+
- OBSERVABILITY_SOURCE_REPO
12+
- DISTRO_PACKAGES_PROXY
13+
- CARGO_PROXY
14+
- DECKHOUSE_PRIVATE_REPO
15+
allowUncommittedFiles: ["tools/build_includes/*"]
1716
stapel:
1817
mount:
19-
allowBuildDir: true
20-
allowFromPaths:
21-
- ~/go-pkg-cache
18+
allowBuildDir: true
19+
allowFromPaths:
20+
- ~/go-pkg-cache

werf.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ cleanup:
7777
# Source repo with observability private code
7878
{{- $_ := set . "OBSERVABILITY_SOURCE_REPO" (env "OBSERVABILITY_SOURCE_REPO" | default "https://example.com") }}
7979

80-
# Stronghold repo access for building d8 cli
81-
{{- $_ := set . "STRONGHOLD_PULL_TOKEN" (env "STRONGHOLD_PULL_TOKEN") }}
8280
{{- $_ := set . "DECKHOUSE_PRIVATE_REPO" (env "DECKHOUSE_PRIVATE_REPO") }}
8381

8482
{{- $_ := set . "CI_COMMIT_TAG" (env "CI_COMMIT_TAG" "dev") }}

0 commit comments

Comments
 (0)