Skip to content

Commit 64bbc7a

Browse files
refactor dvcr build
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
1 parent f598239 commit 64bbc7a

1 file changed

Lines changed: 22 additions & 23 deletions

File tree

images/dvcr/werf.inc.yaml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,33 @@ imageSpec:
2222

2323
image: {{ $.ImageName }}-builder
2424
final: false
25-
# fromImage: builder/alt
26-
fromImage: base-alt-p10
25+
fromImage: builder/alt
2726
secrets:
2827
- id: SOURCE_REPO
2928
value: {{ $.SOURCE_REPO_GIT }}
3029
shell:
3130
install:
32-
# {{/* {{- include "alt packages proxy" . | nindent 2 }} */}}
33-
- |
34-
apt-get update && apt-get install -y \
35-
git openssh golang
36-
37-
mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config
31+
{{- include "alt packages proxy" . | nindent 2 }}
32+
- |
33+
apt-get update && apt-get install -y \
34+
git openssh golang
35+
36+
mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config
3837
39-
export GOPATH=$(go env GOPATH)
40-
export GOROOT=$(go env GOROOT)
41-
export GO111MODULE=off
42-
43-
mkdir -p /container-registry-binary
44-
mkdir -p $GOPATH/src/github.com/docker
38+
export GOPATH=$(go env GOPATH)
39+
export GOROOT=$(go env GOROOT)
40+
export GO111MODULE=off
41+
42+
mkdir -p /container-registry-binary
43+
mkdir -p $GOPATH/src/github.com/docker
4544
46-
cd $GOPATH/src/github.com/docker
47-
git clone --depth 1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }}
48-
cd distribution
45+
cd $GOPATH/src/github.com/docker
46+
git clone --depth 1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }}
47+
cd distribution
4948
50-
go build -o /container-registry-binary/ -ldflags '-s -w -X registry/version.Version=v{{ $version }} -X registry/version.Revision=v{{ $version }}' ./cmd/registry
51-
- |
52-
echo "Clean up"
53-
apt-get clean
54-
rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org* /var/cache/apt/*.bin
55-
rm -rf $(go env GOCACHE)
49+
go build -o /container-registry-binary/ -ldflags '-s -w -X registry/version.Version=v{{ $version }} -X registry/version.Revision=v{{ $version }}' ./cmd/registry
50+
- |
51+
echo "Clean up"
52+
apt-get clean
53+
rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org* /var/cache/apt/*.bin
54+
rm -rf $(go env GOCACHE)

0 commit comments

Comments
 (0)