From 5ac0f046e48cf93f69421b4ab474e80ab715040d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Chapron?= <34628915+sc979@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:55:46 +0200 Subject: [PATCH 1/8] fix(ci): add attempt number in sandbox name (#1664) --- .github/workflows/veracode-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/veracode-analysis.yml b/.github/workflows/veracode-analysis.yml index 9afb0f3f5e2..ac147e8b654 100644 --- a/.github/workflows/veracode-analysis.yml +++ b/.github/workflows/veracode-analysis.yml @@ -197,7 +197,7 @@ jobs: continue-on-error: ${{ vars.VERACODE_CONTINUE_ON_ERROR == 'true' }} with: appname: "${{ inputs.module_name }}" - version: "${{ inputs.major_version }}.${{ inputs.minor_version }}_runId-${{ github.run_id }}" + version: "${{ inputs.major_version }}.${{ inputs.minor_version }}_runId-${{ github.run_id }}_attempt-${{ github.run_attempt }}" filepath: "${{ inputs.module_name }}-${{ github.sha }}-${{ github.run_id }}-veracode-binary.${{ inputs.module_name == 'centreon-collect' && 'tar.gz' || 'zip' }}" vid: "vera01ei-${{ secrets.veracode_api_id }}" vkey: "vera01es-${{ secrets.veracode_api_key }}" @@ -206,4 +206,4 @@ jobs: sandboxname: "${{ github.ref_name }}" includenewmodules: true scanallnonfataltoplevelmodules: true - deleteincompletescan: 2 + deleteincompletescan: 1 From 5356dfde54380efe448b2fa873b33879e980436f Mon Sep 17 00:00:00 2001 From: Kevin Duret Date: Tue, 17 Sep 2024 13:40:44 +0200 Subject: [PATCH 2/8] fix(ci): check PR status from head branch name (#1707) (#1711) --- .github/workflows/check-status.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-status.yml b/.github/workflows/check-status.yml index 36799865754..cd7a383daef 100644 --- a/.github/workflows/check-status.yml +++ b/.github/workflows/check-status.yml @@ -39,7 +39,7 @@ jobs: script: | await exec.exec("sleep 20s"); - for (let i = 0; i < 60; i++) { + for (let i = 0; i < 120; i++) { const failure = []; const cancelled = []; const pending = []; @@ -47,7 +47,7 @@ jobs: const result = await github.rest.checks.listSuitesForRef({ owner: context.repo.owner, repo: context.repo.repo, - ref: "${{ github.event.pull_request.head.sha }}" + ref: "${{ github.head_ref }}" }); result.data.check_suites.forEach(({ app: { slug }, conclusion, id}) => { if (slug === 'github-actions') { From 432c63e072a7317ade8112f98d6be3f2e5f094c2 Mon Sep 17 00:00:00 2001 From: tuntoja <58987095+tuntoja@users.noreply.github.com> Date: Thu, 3 Oct 2024 13:18:07 +0200 Subject: [PATCH 3/8] enh(ci): update legacy packaging (#1739) * update workflows (#1722) * update collect packaging * fix input in collect packaging --- .github/actions/package-sign/action.yml | 10 ++++++++-- .github/workflows/gorgone.yml | 2 ++ .github/workflows/package-collect.yml | 6 ++++-- .github/workflows/package.yml | 10 +++++++--- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/actions/package-sign/action.yml b/.github/actions/package-sign/action.yml index 5286d0e97d1..cf1667cfa2d 100644 --- a/.github/actions/package-sign/action.yml +++ b/.github/actions/package-sign/action.yml @@ -22,6 +22,12 @@ inputs: registry_password: description: Docker registry password required: true + registry_private_username: + description: Docker private registry username + required: true + registry_private_token: + description: Docker private registry token + required: true params: description: "params for script" required: false @@ -32,8 +38,8 @@ runs: uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: ${{ inputs.registry_url }} - username: ${{ inputs.registry_username }} - password: ${{ inputs.registry_password }} + username: ${{ inputs.registry_private_username }} + password: ${{ inputs.registry_private_token }} # REMOVE ME LATER - run: docker pull ${{ inputs.registry_url }}/${{ inputs.image_name }}:${{ inputs.image_version}} diff --git a/.github/workflows/gorgone.yml b/.github/workflows/gorgone.yml index 7a01fc6c2e7..b0c1413b257 100644 --- a/.github/workflows/gorgone.yml +++ b/.github/workflows/gorgone.yml @@ -89,6 +89,8 @@ jobs: secrets: registry_username: ${{ secrets.DOCKER_REGISTRY_ID }} registry_password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + registry_private_username: ${{ secrets.HARBOR_RPM_GPG_SIGNING_REPO_USERNAME }} + registry_private_token: ${{ secrets.HARBOR_RPM_GPG_SIGNING_REPO_TOKEN }} deliver-sources: runs-on: [self-hosted, common] diff --git a/.github/workflows/package-collect.yml b/.github/workflows/package-collect.yml index 17ebf353c39..080c33aa5b1 100644 --- a/.github/workflows/package-collect.yml +++ b/.github/workflows/package-collect.yml @@ -62,10 +62,12 @@ jobs: with: script_name: rpm-signing image_name: rpm-signing - image_version: ubuntu - registry_url: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }} + image_version: latest + registry_url: docker.centreon.com/centreon-private registry_username: ${{ secrets.DOCKER_REGISTRY_ID }} registry_password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + registry_private_username: ${{ secrets.HARBOR_RPM_GPG_SIGNING_REPO_USERNAME }} + registry_private_token: ${{ secrets.HARBOR_RPM_GPG_SIGNING_REPO_TOKEN }} - name: Cache RPM files uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 40dd90b2848..ce3f9a9a794 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -83,6 +83,10 @@ on: required: true registry_password: required: true + registry_private_username: + required: true + registry_private_token: + required: true jobs: package: @@ -132,11 +136,11 @@ jobs: needs: [package] runs-on: ubuntu-22.04 container: - image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/rpm-signing:ubuntu + image: docker.centreon.com/centreon-private/rpm-signing:latest options: -t credentials: - username: ${{ secrets.registry_username }} - password: ${{ secrets.registry_password }} + username: ${{ secrets.registry_private_username }} + password: ${{ secrets.registry_private_token }} steps: - run: | From 5d32cdf08953e68f65fa99b26c031c8a10e20ff8 Mon Sep 17 00:00:00 2001 From: sechkem Date: Thu, 10 Oct 2024 09:30:03 +0100 Subject: [PATCH 4/8] fix(broker/lua): Several fix in the lua Stream (#1687) * Legacy OpenSSL md5 function replaced by the OpenSSL 3 version * improvement of hostgroups cache in streamconnector * improvement of servicegroups cache in streamconnector REFS: MON-147532 MON-34072 MON-15480 MON-25061 --- .../com/centreon/broker/lua/macro_cache.hh | 16 ++- broker/lua/src/broker_utils.cc | 36 +++++- broker/lua/src/macro_cache.cc | 104 ++++++++++++++---- broker/lua/test/lua.cc | 1 + 4 files changed, 130 insertions(+), 27 deletions(-) diff --git a/broker/lua/inc/com/centreon/broker/lua/macro_cache.hh b/broker/lua/inc/com/centreon/broker/lua/macro_cache.hh index ced65c60146..7be5683bb5f 100644 --- a/broker/lua/inc/com/centreon/broker/lua/macro_cache.hh +++ b/broker/lua/inc/com/centreon/broker/lua/macro_cache.hh @@ -30,6 +30,7 @@ #include "com/centreon/broker/neb/host_group.hh" #include "com/centreon/broker/neb/host_group_member.hh" #include "com/centreon/broker/neb/instance.hh" +#include "com/centreon/broker/neb/internal.hh" #include "com/centreon/broker/neb/service.hh" #include "com/centreon/broker/neb/service_group.hh" #include "com/centreon/broker/neb/service_group_member.hh" @@ -46,7 +47,13 @@ class macro_cache { std::shared_ptr _cache; absl::flat_hash_map> _instances; absl::flat_hash_map> _hosts; - absl::flat_hash_map> _host_groups; + /* The host groups cache stores also a set with the pollers telling they need + * the cache. So if no more poller needs a host group, we can remove it from + * the cache. */ + absl::flat_hash_map, + absl::flat_hash_set>> + _host_groups; absl::btree_map, std::shared_ptr> _host_group_members; @@ -55,7 +62,12 @@ class macro_cache { _custom_vars; absl::flat_hash_map, std::shared_ptr> _services; - absl::flat_hash_map> + /* The service groups cache stores also a set with the pollers telling they + * need the cache. So if no more poller needs a service group, we can remove + * it from the cache. */ + absl::flat_hash_map, + absl::flat_hash_set>> _service_groups; absl::btree_map, std::shared_ptr> diff --git a/broker/lua/src/broker_utils.cc b/broker/lua/src/broker_utils.cc index 78fe6b7dbee..120aba72ad5 100644 --- a/broker/lua/src/broker_utils.cc +++ b/broker/lua/src/broker_utils.cc @@ -24,7 +24,7 @@ #include "absl/strings/string_view.h" #include "com/centreon/broker/config/applier/state.hh" -#include +#include #include #include #include @@ -775,6 +775,30 @@ static int l_broker_stat(lua_State* L) { } } +static void md5_message(const unsigned char* message, + size_t message_len, + unsigned char** digest, + unsigned int* digest_len) { + EVP_MD_CTX* mdctx; + if ((mdctx = EVP_MD_CTX_new()) == nullptr) { + log_v2::lua()->error("lua: fail to call MD5 (EVP_MD_CTX_new call)"); + } + if (1 != EVP_DigestInit_ex(mdctx, EVP_md5(), nullptr)) { + log_v2::lua()->error("lua: fail to call MD5 (EVP_DigestInit_ex call)"); + } + if (1 != EVP_DigestUpdate(mdctx, message, message_len)) { + log_v2::lua()->error("lua: fail to call MD5 (EVP_DigestUpdate call)"); + } + if ((*digest = (unsigned char*)OPENSSL_malloc(EVP_MD_size(EVP_md5()))) == + nullptr) { + log_v2::lua()->error("lua: fail to call MD5 (OPENSSL_malloc call)"); + } + if (1 != EVP_DigestFinal_ex(mdctx, *digest, digest_len)) { + log_v2::lua()->error("lua: fail to call MD5 (EVP_DigestFinal_ex call)"); + } + EVP_MD_CTX_free(mdctx); +} + static int l_broker_md5(lua_State* L) { auto digit = [](unsigned char d) -> char { if (d < 10) @@ -785,11 +809,12 @@ static int l_broker_md5(lua_State* L) { size_t len; const unsigned char* str = reinterpret_cast(lua_tolstring(L, -1, &len)); - unsigned char md5[MD5_DIGEST_LENGTH]; - MD5(str, len, md5); - char result[2 * MD5_DIGEST_LENGTH + 1]; + unsigned char* md5; + uint32_t md5_len; + md5_message(str, len, &md5, &md5_len); + char result[2 * md5_len + 1]; char* tmp = result; - for (int i = 0; i < MD5_DIGEST_LENGTH; i++) { + for (uint32_t i = 0; i < md5_len; i++) { *tmp = digit(md5[i] >> 4); ++tmp; *tmp = digit(md5[i] & 0xf); @@ -797,6 +822,7 @@ static int l_broker_md5(lua_State* L) { } *tmp = 0; lua_pushstring(L, result); + OPENSSL_free(md5); return 1; } diff --git a/broker/lua/src/macro_cache.cc b/broker/lua/src/macro_cache.cc index 9867744dd4b..c10981c140f 100644 --- a/broker/lua/src/macro_cache.cc +++ b/broker/lua/src/macro_cache.cc @@ -295,12 +295,15 @@ macro_cache::get_host_group_members() const { * * @return The name of the host group. */ -std::string const& macro_cache::get_host_group_name(uint64_t id) const { - auto const found = _host_groups.find(id); +const std::string& macro_cache::get_host_group_name(uint64_t id) const { + const auto found = _host_groups.find(id); - if (found == _host_groups.end()) + if (found == _host_groups.end()) { + SPDLOG_LOGGER_ERROR(log_v2::lua(), + "lua: could not find information on host group {}", id); throw msg_fmt("lua: could not find information on host group {}", id); - return found->second->name; + } + return found->second.first->name; } /** @@ -351,9 +354,13 @@ macro_cache::get_service_group_members() const { std::string const& macro_cache::get_service_group_name(uint64_t id) const { auto found = _service_groups.find(id); - if (found == _service_groups.end()) + if (found == _service_groups.end()) { + SPDLOG_LOGGER_ERROR(log_v2::lua(), + "lua: could not find information on service group {}", + id); throw msg_fmt("lua: could not find information on service group {}", id); - return found->second->name; + } + return found->second.first->name; } /** @@ -618,12 +625,36 @@ void macro_cache::_process_pb_adaptive_host( * @param data The event. */ void macro_cache::_process_host_group(std::shared_ptr const& data) { - std::shared_ptr const& hg = + const std::shared_ptr& hg = std::static_pointer_cast(data); - log_v2::lua()->debug("lua: processing host group '{}' of id {}", hg->name, - hg->id); - if (hg->enabled) - _host_groups[hg->id] = hg; + SPDLOG_LOGGER_DEBUG(log_v2::lua(), + "lua: processing host group '{}' of id {} enabled: {}", + hg->name, hg->id, hg->enabled); + if (hg->enabled) { + auto found = _host_groups.find(hg->id); + if (found != _host_groups.end()) { + /* here, we complete the set of pollers */ + found->second.second.insert(hg->poller_id); + found->second.first->name = hg->name; + } else { + /* Here, we add the hostgroup and the first poller that needs it */ + absl::flat_hash_set pollers{hg->poller_id}; + _host_groups[hg->id] = std::make_pair(hg, pollers); + } + } else { + /* We check that no more pollers need this host group. So if the set is + * empty, we can also remove the host group. */ + auto found = _host_groups.find(hg->id); + if (found != _host_groups.end()) { + auto f = found->second.second.find(hg->poller_id); + if (f != found->second.second.end()) { + found->second.second.erase(f); + if (found->second.second.empty()) { + _host_groups.erase(found); + } + } + } + } } /** @@ -771,10 +802,34 @@ void macro_cache::_process_pb_adaptive_service( void macro_cache::_process_service_group( std::shared_ptr const& data) { auto const& sg = std::static_pointer_cast(data); - log_v2::lua()->debug("lua: processing service group '{}' of id {}", sg->name, - sg->id); - if (sg->enabled) - _service_groups[sg->id] = sg; + SPDLOG_LOGGER_DEBUG(log_v2::lua(), + "lua: processing service group '{}' of id {}", sg->name, + sg->id); + if (sg->enabled) { + auto found = _service_groups.find(sg->id); + if (found != _service_groups.end()) { + /* here, we complete the set of pollers */ + found->second.second.insert(sg->poller_id); + found->second.first->name = sg->name; + } else { + /* Here, we add the servicegroup and the first poller that needs it */ + absl::flat_hash_set pollers{sg->poller_id}; + _service_groups[sg->id] = std::make_pair(sg, pollers); + } + } else { + /* We check that no more pollers need this service group. So if the set is + * empty, we can also remove the service group. */ + auto found = _service_groups.find(sg->id); + if (found != _service_groups.end()) { + auto f = found->second.second.find(sg->poller_id); + if (f != found->second.second.end()) { + found->second.second.erase(f); + if (found->second.second.empty()) { + _service_groups.erase(found); + } + } + } + } } /** @@ -919,8 +974,13 @@ void macro_cache::_save_to_disk() { for (auto it(_hosts.begin()), end(_hosts.end()); it != end; ++it) _cache->add(it->second); - for (auto it(_host_groups.begin()), end(_host_groups.end()); it != end; ++it) - _cache->add(it->second); + for (auto it = _host_groups.begin(), end = _host_groups.end(); it != end; + ++it) { + for (auto poller_id : it->second.second) { + it->second.first->id = poller_id; + _cache->add(it->second.first); + } + } for (auto it(_host_group_members.begin()), end(_host_group_members.end()); it != end; ++it) @@ -929,9 +989,13 @@ void macro_cache::_save_to_disk() { for (auto it(_services.begin()), end(_services.end()); it != end; ++it) _cache->add(it->second); - for (auto it(_service_groups.begin()), end(_service_groups.end()); it != end; - ++it) - _cache->add(it->second); + for (auto it = _service_groups.begin(), end = _service_groups.end(); + it != end; ++it) { + for (auto poller_id : it->second.second) { + it->second.first->id = poller_id; + _cache->add(it->second.first); + } + } for (auto it = _service_group_members.begin(), end = _service_group_members.end(); diff --git a/broker/lua/test/lua.cc b/broker/lua/test/lua.cc index 91b63bfde9b..df2bdfda568 100644 --- a/broker/lua/test/lua.cc +++ b/broker/lua/test/lua.cc @@ -1403,6 +1403,7 @@ TEST_F(LuaTest, ServiceGroupCacheTestName) { auto sg{std::make_shared()}; sg->id = 28; sg->name = "centreon"; + sg->enabled = true; _cache->write(sg); CreateScript(filename, From 7d803635a2e109b7f9f96e9ebe215269bffc5327 Mon Sep 17 00:00:00 2001 From: tuntoja <58987095+tuntoja@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:06:34 +0200 Subject: [PATCH 5/8] Mon 50538 update docker push in workflows dev2210x (#1769) * enh(ci): update push jobs in workflows (#1755) * update secret name --- .github/workflows/docker-builder.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-builder.yml b/.github/workflows/docker-builder.yml index d7121d7e90b..1bbe7fee951 100644 --- a/.github/workflows/docker-builder.yml +++ b/.github/workflows/docker-builder.yml @@ -42,8 +42,8 @@ jobs: uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 with: registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }} - username: ${{ secrets.DOCKER_REGISTRY_ID }} - password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }} + password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }} - name: Login to Proxy Registry uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 From 472779a8c8310085dbb30f085bcf787541ad9145 Mon Sep 17 00:00:00 2001 From: pkippes <144150042+pkippes@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:49:13 +0100 Subject: [PATCH 6/8] chore(release) bump collect to 22.10.12 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d901b6ad006..54f298cbda1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,7 +117,7 @@ endif() # Version. set(COLLECT_MAJOR 22) set(COLLECT_MINOR 10) -set(COLLECT_PATCH 11) +set(COLLECT_PATCH 12) set(COLLECT_VERSION "${COLLECT_MAJOR}.${COLLECT_MINOR}.${COLLECT_PATCH}") add_definitions(-DCENTREON_CONNECTOR_VERSION=\"${COLLECT_VERSION}\") From 9ba496da1014e327f6eff6409661be31c49be4e7 Mon Sep 17 00:00:00 2001 From: pkippes <144150042+pkippes@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:50:10 +0100 Subject: [PATCH 7/8] chore(release) bump collect to 22.10.12 --- .version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.version b/.version index f0235fae072..ad18c5701ff 100644 --- a/.version +++ b/.version @@ -1,2 +1,2 @@ MAJOR=22.10 -MINOR=11 +MINOR=12 From 65eb46d8701e8485510a2f3d80e99eb58546df69 Mon Sep 17 00:00:00 2001 From: tuntoja <58987095+tuntoja@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:55:26 +0100 Subject: [PATCH 8/8] enh(ci): update pull and push jobs in workflows (#1806) --- .github/workflows/centreon-collect.yml | 4 ++-- .github/workflows/docker-builder.yml | 4 ++-- .github/workflows/gorgone.yml | 8 ++++---- .github/workflows/lua-curl.yml | 4 ++-- .github/workflows/package-collect.yml | 12 ++++++------ .github/workflows/robot-nightly.yml | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/centreon-collect.yml b/.github/workflows/centreon-collect.yml index f5eaddd61ab..1f8c7cb0754 100644 --- a/.github/workflows/centreon-collect.yml +++ b/.github/workflows/centreon-collect.yml @@ -71,8 +71,8 @@ jobs: uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 with: registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }} - username: ${{ secrets.DOCKER_REGISTRY_ID }} - password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} + password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} - name: Test ${{ matrix.image }} uses: ./.github/actions/runner-docker diff --git a/.github/workflows/docker-builder.yml b/.github/workflows/docker-builder.yml index 1bbe7fee951..84d5a137489 100644 --- a/.github/workflows/docker-builder.yml +++ b/.github/workflows/docker-builder.yml @@ -49,8 +49,8 @@ jobs: uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 with: registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }} - username: ${{ secrets.DOCKER_REGISTRY_ID }} - password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} + password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 diff --git a/.github/workflows/gorgone.yml b/.github/workflows/gorgone.yml index b0c1413b257..11cbf93151f 100644 --- a/.github/workflows/gorgone.yml +++ b/.github/workflows/gorgone.yml @@ -51,8 +51,8 @@ jobs: veracode_api_id: ${{ secrets.VERACODE_API_ID_GORG }} veracode_api_key: ${{ secrets.VERACODE_API_KEY_GORG }} veracode_srcclr_token: ${{ secrets.VERACODE_SRCCLR_TOKEN }} - docker_registry_id: ${{ secrets.DOCKER_REGISTRY_ID }} - docker_registry_passwd: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + docker_registry_id: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} + docker_registry_passwd: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} package: needs: [get-version] @@ -87,8 +87,8 @@ jobs: cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }} distrib: ${{ matrix.distrib }} secrets: - registry_username: ${{ secrets.DOCKER_REGISTRY_ID }} - registry_password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + registry_username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} + registry_password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} registry_private_username: ${{ secrets.HARBOR_RPM_GPG_SIGNING_REPO_USERNAME }} registry_private_token: ${{ secrets.HARBOR_RPM_GPG_SIGNING_REPO_TOKEN }} diff --git a/.github/workflows/lua-curl.yml b/.github/workflows/lua-curl.yml index 0e1b92d74d9..d3394aecef0 100644 --- a/.github/workflows/lua-curl.yml +++ b/.github/workflows/lua-curl.yml @@ -53,8 +53,8 @@ jobs: container: image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest credentials: - username: ${{ secrets.DOCKER_REGISTRY_ID }} - password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} + password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} name: package ${{ matrix.distrib }} ${{ matrix.arch }} diff --git a/.github/workflows/package-collect.yml b/.github/workflows/package-collect.yml index 080c33aa5b1..7d7577e1950 100644 --- a/.github/workflows/package-collect.yml +++ b/.github/workflows/package-collect.yml @@ -43,8 +43,8 @@ jobs: uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 with: registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }} - username: ${{ secrets.DOCKER_REGISTRY_ID }} - password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} + password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} - name: package rpm ${{ matrix.image }} run: | @@ -64,8 +64,8 @@ jobs: image_name: rpm-signing image_version: latest registry_url: docker.centreon.com/centreon-private - registry_username: ${{ secrets.DOCKER_REGISTRY_ID }} - registry_password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + registry_username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} + registry_password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} registry_private_username: ${{ secrets.HARBOR_RPM_GPG_SIGNING_REPO_USERNAME }} registry_private_token: ${{ secrets.HARBOR_RPM_GPG_SIGNING_REPO_TOKEN }} @@ -108,8 +108,8 @@ jobs: uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 with: registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }} - username: ${{ secrets.DOCKER_REGISTRY_ID }} - password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} + password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} - name: debmake ${{ matrix.image }} uses: ./centreon-collect/.github/actions/runner-docker diff --git a/.github/workflows/robot-nightly.yml b/.github/workflows/robot-nightly.yml index 0a6445a1c11..ca2c0e27739 100644 --- a/.github/workflows/robot-nightly.yml +++ b/.github/workflows/robot-nightly.yml @@ -26,5 +26,5 @@ jobs: veracode_api_id: ${{ secrets.VERACODE_API_ID_COLL }} veracode_api_key: ${{ secrets.VERACODE_API_KEY_COLL }} veracode_srcclr_token: ${{ secrets.VERACODE_SRCCLR_TOKEN }} - docker_registry_id: ${{ secrets.DOCKER_REGISTRY_ID }} - docker_registry_passwd: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + docker_registry_id: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} + docker_registry_passwd: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }}