Skip to content

Commit

Permalink
add specs for companiesdb data update. AG-35366
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 6b95caa
Author: Slava Leleka <[email protected]>
Date:   Thu Aug 29 13:06:39 2024 +0300

    add specs for companiesdb data update. AG-35366

    Squashed commit of the following:

    commit 0fb8750
    Author: Slava Leleka <[email protected]>
    Date:   Wed Aug 28 20:35:29 2024 +0300

        add pnpm install to update-companiesdb specs

    commit b7e967e
    Author: Slava Leleka <[email protected]>
    Date:   Wed Aug 28 20:32:47 2024 +0300

        rename

    commit 18991c5
    Author: Slava Leleka <[email protected]>
    Date:   Wed Aug 28 20:32:03 2024 +0300

        add todo

    commit b1e8f14
    Author: Slava Leleka <[email protected]>
    Date:   Wed Aug 28 20:31:03 2024 +0300

        update specs

    commit 9456aa9
    Merge: a2c4ceb e0c580f
    Author: Slava Leleka <[email protected]>
    Date:   Wed Aug 28 20:30:22 2024 +0300

        Merge branch 'fix/AG-35366' into fix/AG-35366-02

    commit a2c4ceb
    Author: Slava Leleka <[email protected]>
    Date:   Wed Aug 28 20:28:18 2024 +0300

        fix comment

    commit c8750cc
    Merge: 2c612c7 e84b09f
    Author: Slava Leleka <[email protected]>
    Date:   Wed Aug 28 20:27:38 2024 +0300

        Merge branch 'fix/AG-35366' into fix/AG-35366-02

    commit 2c612c7
    Author: Slava Leleka <[email protected]>
    Date:   Tue Aug 27 12:51:44 2024 +0300

        fix cron expression

    commit 202de3c
    Author: Slava Leleka <[email protected]>
    Date:   Mon Aug 26 18:34:21 2024 +0300

        fix comment

    commit ce84e52
    Merge: e140532 c6b0dad
    Author: Slava Leleka <[email protected]>
    Date:   Mon Aug 26 18:33:50 2024 +0300

        Merge branch 'fix/AG-35366' into fix/AG-35366-02

    commit e140532
    Author: Slava Leleka <[email protected]>
    Date:   Mon Aug 26 18:30:19 2024 +0300

        add specs for companiesdb data update
  • Loading branch information
slavaleleka committed Aug 29, 2024
1 parent e7654af commit 010204d
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bamboo-specs/bamboo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
---
!include 'tswebextension-increment.yaml'

---
!include 'tswebextension-update-companiesdb.yaml'

---
!include 'adguard-api-build.yaml'

Expand Down
97 changes: 97 additions & 0 deletions bamboo-specs/tswebextension-update-companiesdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
version: 2
plan:
project-key: AJL
key: TSWEBEXTENSIONUPDCOMPANIESDB
name: tswebextension - update companiesdb
variables:
dockerContainer: adguard/node-ssh:18.19--0

stages:
- Build:
manual: false
final: false
jobs:
- Build

Build:
key: TSWEBEXTUPDCOMPANIESDB
docker:
image: "${bamboo.dockerContainer}"
volumes:
${system.PNPM_DIR}: "${bamboo.cachePnpm}"
tasks:
- checkout:
force-clean-build: 'true'
- script:
interpreter: SHELL
scripts:
- |-
set -e
set -x
# Fix mixed logs
exec 2>&1
ls -alt
branch="${bamboo.planRepository.branchName}"
# TODO: remove when release/v3.1 is merged into master
# Throw error if current branch is not "release/v3.1",
if [ $branch != "release/v3.1" ]
then
echo "load companiesdb is not supported on branch ${branch}"
exit 1;
fi
# Install dependencies
pnpm install
# update companiesdb data
pnpm --filter @adguard/tswebextension update:companiesdb
- any-task:
plugin-key: com.atlassian.bamboo.plugins.vcs:task.vcs.commit
configuration:
commitMessage: 'skipci: update companiesdb data'
selectedRepository: defaultRepository
final-tasks:
- script:
interpreter: SHELL
scripts:
- |-
set -x
set -e
# Fix mixed logs
exec 2>&1
ls -la
echo "Size before cleanup:" && du -h | tail -n 1
# Check if node_modules directory exists
if [ -d "node_modules" ]; then
pnpm clean
else
echo "node_modules directory does not exist, skipping pnpm clean"
fi
echo "Size after cleanup:" && du -h | tail -n 1
requirements:
- adg-docker: 'true'

# run release build at 11:00 every Monday (after companiesdb update)
triggers:
- cron:
expression: 0 0 11 ? * MON

branches:
create: manually
delete: never
link-to-jira: 'true'

labels: [ ]

other:
concurrent-build-plugin: system-default

0 comments on commit 010204d

Please sign in to comment.