Pull request 2179: upd-docker

Squashed commit of the following:

commit 17e145c87b1fabde75d6dbe96570a1720a2e1306
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Mar 20 18:49:18 2024 +0300

    bamboo-specs: upd builder img

commit d6399a084b0e6b26cf27acc617838fdf7ea94e00
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Mar 20 18:35:01 2024 +0300

    bamboo-specs: fix frontend build

commit 9f4cbf5fd8f085e634ff021ab5320454856b3425
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Mar 20 18:21:50 2024 +0300

    bamboo-specs: fix yaml

commit a26d2ab063c23873e132e659ae4ba1035325ad3a
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Mar 20 18:18:57 2024 +0300

    all: use new docker imgs
This commit is contained in:
Ainar Garipov 2024-03-20 19:03:46 +03:00
parent 0542339623
commit 54f77c0101
6 changed files with 124 additions and 74 deletions

View File

@ -53,9 +53,9 @@
'path': '${{ steps.npm-cache.outputs.dir }}' 'path': '${{ steps.npm-cache.outputs.dir }}'
'key': "${{ runner.os }}-node-${{ hashFiles('client/package-lock.json') }}" 'key': "${{ runner.os }}-node-${{ hashFiles('client/package-lock.json') }}"
'restore-keys': '${{ runner.os }}-node-' 'restore-keys': '${{ runner.os }}-node-'
- 'name': 'Run make ci' - 'name': 'Run tests'
'shell': 'bash' 'shell': 'bash'
'run': 'make VERBOSE=1 ci' 'run': 'make VERBOSE=1 deps test go-bench go-fuzz'
- 'name': 'Upload coverage' - 'name': 'Upload coverage'
'uses': 'codecov/codecov-action@v1' 'uses': 'codecov/codecov-action@v1'
'if': "success() && matrix.os == 'ubuntu-latest'" 'if': "success() && matrix.os == 'ubuntu-latest'"

View File

@ -23,6 +23,10 @@ See also the [v0.107.47 GitHub milestone][ms-v0.107.47].
NOTE: Add new changes BELOW THIS COMMENT. NOTE: Add new changes BELOW THIS COMMENT.
--> -->
### Deprecated
- Node.JS 16. Future versions will require at least Node.JS 18 to build.
<!-- <!--
NOTE: Add new changes ABOVE THIS COMMENT. NOTE: Add new changes ABOVE THIS COMMENT.
--> -->
@ -42,11 +46,11 @@ See also the [v0.107.46 GitHub milestone][ms-v0.107.46].
### Changed ### Changed
- Private RDNS resolution (`dns.use_private_ptr_resolvers` in YAML - Private rDNS resolution (`dns.use_private_ptr_resolvers` in YAML
configuration) now requires a valid "Private reverse DNS servers", when configuration) now requires a valid "Private reverse DNS servers", when
enabled ([#6820]). enabled ([#6820]).
**NOTE:** Disabling private RDNS resolution behaves effectively the same as if **NOTE:** Disabling private rDNS resolution behaves effectively the same as if
no private reverse DNS servers provided by user and by the OS. no private reverse DNS servers provided by user and by the OS.
### Fixed ### Fixed

View File

@ -82,8 +82,6 @@ build: deps quick-build
quick-build: js-build go-build quick-build: js-build go-build
ci: deps test go-bench go-fuzz
deps: js-deps go-deps deps: js-deps go-deps
lint: js-lint go-lint lint: js-lint go-lint
test: js-test go-test test: js-test go-test
@ -98,15 +96,10 @@ build-release: $(BUILD_RELEASE_DEPS_$(FRONTEND_PREBUILT))
clean: ; $(ENV) "$(SHELL)" ./scripts/make/clean.sh clean: ; $(ENV) "$(SHELL)" ./scripts/make/clean.sh
init: ; git config core.hooksPath ./scripts/hooks init: ; git config core.hooksPath ./scripts/hooks
js-build: js-build: ; $(NPM) $(NPM_FLAGS) run build-prod
$(NPM) $(NPM_FLAGS) run build-prod js-deps: ; $(NPM) $(NPM_INSTALL_FLAGS) ci
js-deps: js-lint: ; $(NPM) $(NPM_FLAGS) run lint
$(NPM) $(NPM_INSTALL_FLAGS) ci js-test: ; $(NPM) $(NPM_FLAGS) run test
# TODO(a.garipov): Remove the legacy client tasks support once the new
# client is done and the old one is removed.
js-lint: ; $(NPM) $(NPM_FLAGS) run lint
js-test: ; $(NPM) $(NPM_FLAGS) run test
go-bench: ; $(ENV) "$(SHELL)" ./scripts/make/go-bench.sh go-bench: ; $(ENV) "$(SHELL)" ./scripts/make/go-bench.sh
go-build: ; $(ENV) "$(SHELL)" ./scripts/make/go-build.sh go-build: ; $(ENV) "$(SHELL)" ./scripts/make/go-build.sh

View File

@ -7,8 +7,7 @@
# Make sure to sync any changes with the branch overrides below. # Make sure to sync any changes with the branch overrides below.
'variables': 'variables':
'channel': 'edge' 'channel': 'edge'
# TODO(a.garipov): Split away the frontend image. 'dockerFrontend': 'adguard/home-js-builder:1.1'
'dockerFrontend': 'adguard/golang-ubuntu:9.0'
'dockerGo': 'adguard/go-builder:1.21.8--1' 'dockerGo': 'adguard/go-builder:1.21.8--1'
'stages': 'stages':
@ -42,9 +41,12 @@
'jobs': 'jobs':
- 'Publish to GitHub Releases' - 'Publish to GitHub Releases'
# TODO(e.burkov): In jobs below find out why the explicit checkout is
# performed.
'Build frontend': 'Build frontend':
'artifacts':
- 'name': 'AdGuardHome frontend'
'pattern': 'build/**'
'shared': true
'required': true
'docker': 'docker':
'image': '${bamboo.dockerFrontend}' 'image': '${bamboo.dockerFrontend}'
'volumes': 'volumes':
@ -63,19 +65,21 @@
set -e -f -u -x set -e -f -u -x
# Explicitly checkout the revision that we need. make\
git checkout "${bamboo.repository.revision.number}" VERBOSE=1\
js-deps js-build
make js-deps js-build
'artifacts':
- 'name': 'AdGuardHome frontend'
'pattern': 'build/**'
'shared': true
'required': true
'requirements': 'requirements':
- 'adg-docker': 'true' - 'adg-docker': 'true'
'Make release': 'Make release':
'artifact-subscriptions':
- 'artifact': 'AdGuardHome frontend'
# TODO(a.garipov): Use more fine-grained artifact rules.
'artifacts':
- 'name': 'AdGuardHome dists'
'pattern': 'dist/**'
'shared': true
'required': true
'docker': 'docker':
'image': '${bamboo.dockerGo}' 'image': '${bamboo.dockerGo}'
'volumes': 'volumes':
@ -95,9 +99,6 @@
set -e -f -u -x set -e -f -u -x
# Explicitly checkout the revision that we need.
git checkout "${bamboo.repository.revision.number}"
# Run the build with the specified channel. # Run the build with the specified channel.
echo "${bamboo.gpgSecretKeyPart1}${bamboo.gpgSecretKeyPart2}"\ echo "${bamboo.gpgSecretKeyPart1}${bamboo.gpgSecretKeyPart2}"\
| awk '{ gsub(/\\n/, "\n"); print; }'\ | awk '{ gsub(/\\n/, "\n"); print; }'\
@ -110,12 +111,6 @@
PARALLELISM=1\ PARALLELISM=1\
VERBOSE=2\ VERBOSE=2\
build-release build-release
# TODO(a.garipov): Use more fine-grained artifact rules.
'artifacts':
- 'name': 'AdGuardHome dists'
'pattern': 'dist/**'
'shared': true
'required': true
'requirements': 'requirements':
- 'adg-docker': 'true' - 'adg-docker': 'true'
@ -134,13 +129,6 @@
set -e -f -u -x set -e -f -u -x
COMMIT="${bamboo.repository.revision.number}"
export COMMIT
readonly COMMIT
# Explicitly checkout the revision that we need.
git checkout "$COMMIT"
# Install Qemu, create builder. # Install Qemu, create builder.
docker version -f '{{ .Server.Experimental }}' docker version -f '{{ .Server.Experimental }}'
docker buildx rm buildx-builder || : docker buildx rm buildx-builder || :
@ -276,7 +264,7 @@
# need to build a few of these. # need to build a few of these.
'variables': 'variables':
'channel': 'beta' 'channel': 'beta'
'dockerFrontend': 'adguard/golang-ubuntu:9.0' 'dockerFrontend': 'adguard/home-js-builder:1.1'
'dockerGo': 'adguard/go-builder:1.21.8--1' 'dockerGo': 'adguard/go-builder:1.21.8--1'
# release-vX.Y.Z branches are the branches from which the actual final # release-vX.Y.Z branches are the branches from which the actual final
# release is built. # release is built.
@ -292,5 +280,5 @@
# are the ones that actually get released. # are the ones that actually get released.
'variables': 'variables':
'channel': 'release' 'channel': 'release'
'dockerFrontend': 'adguard/golang-ubuntu:9.0' 'dockerFrontend': 'adguard/home-js-builder:1.1'
'dockerGo': 'adguard/go-builder:1.21.8--1' 'dockerGo': 'adguard/go-builder:1.21.8--1'

View File

@ -10,7 +10,7 @@
# Make sure to sync any changes with the branch overrides below. # Make sure to sync any changes with the branch overrides below.
'variables': 'variables':
'channel': 'edge' 'channel': 'edge'
'dockerSnap': 'adguard/snap-builder:1.0' 'dockerSnap': 'adguard/snap-builder:1.1'
'snapcraftChannel': 'edge' 'snapcraftChannel': 'edge'
'stages': 'stages':
@ -191,7 +191,7 @@
# need to build a few of these. # need to build a few of these.
'variables': 'variables':
'channel': 'beta' 'channel': 'beta'
'dockerSnap': 'adguard/snap-builder:1.0' 'dockerSnap': 'adguard/snap-builder:1.1'
'snapcraftChannel': 'beta' 'snapcraftChannel': 'beta'
# release-vX.Y.Z branches are the branches from which the actual final # release-vX.Y.Z branches are the branches from which the actual final
# release is built. # release is built.
@ -207,5 +207,5 @@
# are the ones that actually get released. # are the ones that actually get released.
'variables': 'variables':
'channel': 'release' 'channel': 'release'
'dockerSnap': 'adguard/snap-builder:1.0' 'dockerSnap': 'adguard/snap-builder:1.1'
'snapcraftChannel': 'candidate' 'snapcraftChannel': 'candidate'

View File

@ -5,8 +5,8 @@
'key': 'AHBRTSPECS' 'key': 'AHBRTSPECS'
'name': 'AdGuard Home - Build and run tests' 'name': 'AdGuard Home - Build and run tests'
'variables': 'variables':
# TODO(a.garipov): Split away the frontend image and stages. 'dockerFrontend': 'adguard/home-js-builder:1.1'
'dockerGo': 'adguard/golang-ubuntu:9.0' 'dockerGo': 'adguard/go-builder:1.21.8--1'
'channel': 'development' 'channel': 'development'
'stages': 'stages':
@ -14,7 +14,14 @@
'manual': false 'manual': false
'final': false 'final': false
'jobs': 'jobs':
- 'Test' - 'Test frontend'
- 'Test backend'
- 'Frontend':
manual: false
final: false
jobs:
- 'Build frontend'
- 'Artifact': - 'Artifact':
manual: false manual: false
@ -22,14 +29,12 @@
jobs: jobs:
- 'Artifact' - 'Artifact'
'Test': 'Test frontend':
'docker': 'docker':
'image': '${bamboo.dockerGo}' 'image': '${bamboo.dockerFrontend}'
'volumes': 'volumes':
'${system.YARN_DIR}': '${bamboo.cacheYarn}' '${system.YARN_DIR}': '${bamboo.cacheYarn}'
'${system.GO_CACHE_DIR}': '${bamboo.cacheGo}' 'key': 'JSTEST'
'${system.GO_PKG_CACHE_DIR}': '${bamboo.cacheGoPkg}'
'key': 'TEST'
'other': 'other':
'clean-working-dir': true 'clean-working-dir': true
'tasks': 'tasks':
@ -43,13 +48,84 @@
set -e -f -u -x set -e -f -u -x
make VERBOSE=1 ci go-tools lint make VERBOSE=1 js-deps js-lint js-test
'final-tasks': 'final-tasks':
- 'clean' - 'clean'
'requirements': 'requirements':
- 'adg-docker': 'true' - 'adg-docker': 'true'
'Test backend':
'docker':
'image': '${bamboo.dockerGo}'
'volumes':
'${system.GO_CACHE_DIR}': '${bamboo.cacheGo}'
'${system.GO_PKG_CACHE_DIR}': '${bamboo.cacheGoPkg}'
'key': 'GOTEST'
'other':
'clean-working-dir': true
'tasks':
- 'checkout':
'force-clean-build': true
- 'script':
'interpreter': 'SHELL'
'scripts':
- |
#!/bin/sh
set -e -f -u -x
make VERBOSE=1 go-deps go-tools go-lint go-test
'final-tasks':
- 'clean'
'requirements':
- 'adg-docker': 'true'
'Build frontend':
'artifacts':
- 'name': 'AdGuardHome frontend'
'pattern': 'build/**'
'shared': true
'required': true
'docker':
'image': '${bamboo.dockerFrontend}'
'volumes':
'${system.YARN_DIR}': '${bamboo.cacheYarn}'
'key': 'BF'
'other':
'clean-working-dir': true
'tasks':
- 'checkout':
'force-clean-build': true
- 'script':
'interpreter': 'SHELL'
'scripts':
- |-
#!/bin/sh
set -e -f -u -x
make\
VERBOSE=1\
js-deps js-build
'requirements':
- 'adg-docker': 'true'
'Artifact': 'Artifact':
'artifact-subscriptions':
- 'artifact': 'AdGuardHome frontend'
'artifacts':
- 'name': 'AdGuardHome_windows_amd64'
'pattern': 'dist/AdGuardHome_windows_amd64.zip'
'shared': true
'required': true
- 'name': 'AdGuardHome_darwin_amd64'
'pattern': 'dist/AdGuardHome_darwin_amd64.zip'
'shared': true
'required': true
- 'name': 'AdGuardHome_linux_amd64'
'pattern': 'dist/AdGuardHome_linux_amd64.tar.gz'
'shared': true
'required': true
'docker': 'docker':
'image': '${bamboo.dockerGo}' 'image': '${bamboo.dockerGo}'
'volumes': 'volumes':
@ -71,25 +147,13 @@
make\ make\
ARCH="amd64"\ ARCH="amd64"\
OS="windows darwin linux"\
CHANNEL=${bamboo.channel}\ CHANNEL=${bamboo.channel}\
SIGN=0\ FRONTEND_PREBUILT=1\
OS="windows darwin linux"\
PARALLELISM=1\ PARALLELISM=1\
SIGN=0\
VERBOSE=2\ VERBOSE=2\
build-release build-release
'artifacts':
- 'name': 'AdGuardHome_windows_amd64'
'pattern': 'dist/AdGuardHome_windows_amd64.zip'
'shared': true
'required': true
- 'name': 'AdGuardHome_darwin_amd64'
'pattern': 'dist/AdGuardHome_darwin_amd64.zip'
'shared': true
'required': true
- 'name': 'AdGuardHome_linux_amd64'
'pattern': 'dist/AdGuardHome_linux_amd64.tar.gz'
'shared': true
'required': true
'requirements': 'requirements':
- 'adg-docker': 'true' - 'adg-docker': 'true'
@ -123,5 +187,6 @@
# Set the default release channel on the release branch to beta, as we # Set the default release channel on the release branch to beta, as we
# may need to build a few of these. # may need to build a few of these.
'variables': 'variables':
'dockerGo': 'adguard/golang-ubuntu:9.0' 'dockerFrontend': 'adguard/home-js-builder:1.1'
'dockerGo': 'adguard/go-builder:1.21.8--1'
'channel': 'candidate' 'channel': 'candidate'