From 6920048c4dfe3d33d534ded1e0b04f774fa7bfb3 Mon Sep 17 00:00:00 2001 From: Or Ouziel Date: Tue, 23 Jan 2024 23:41:26 +0200 Subject: [PATCH] try integrations PR --- .github/workflows/bump-version.yml | 8 ++++---- scripts/bump_integration.sh | 14 ++++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 8017f17516..a2fd5bf322 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -36,8 +36,8 @@ jobs: echo "CURRENT_CLOUDBEAT_VERSION=$version" >> $GITHUB_ENV echo "Bumping $version to $NEXT_CLOUDBEAT_VERSION" - - name: Bump cloudbeat - run: scripts/bump_cloudbeat.sh + # - name: Bump cloudbeat + # run: scripts/bump_cloudbeat.sh - # - name: Bump integration - # run: scripts/bump_integration.sh + - name: Bump integration + run: scripts/bump_integration.sh diff --git a/scripts/bump_integration.sh b/scripts/bump_integration.sh index 3f657c4579..00787b0d83 100755 --- a/scripts/bump_integration.sh +++ b/scripts/bump_integration.sh @@ -3,7 +3,7 @@ set -euo pipefail export MANIFEST_PATH="packages/cloud_security_posture/manifest.yml" export CHANGELOG_PATH="packages/cloud_security_posture/changelog.yml" -export INTEGRATION_REPO="orouz/integrations" # TODO: change to elastic/integrations +export INTEGRATION_REPO="elastic/integrations" export BRANCH="bump-to-$NEXT_CLOUDBEAT_VERSION" export MAJOR_MINOR_CLOUDBEAT=$(echo "$NEXT_CLOUDBEAT_VERSION" | cut -d. -f1,2) @@ -14,7 +14,7 @@ checkout_integration_repo() { gh auth setup-git gh repo clone $INTEGRATION_REPO cd integrations - git checkout -b "$BRANCH" main + git checkout -b "$BRANCH" origin/main } get_next_integration_version() { @@ -45,9 +45,15 @@ update_manifest_version_vars() { create_integrations_pr() { echo 'Creating a PR to update integration' + cat <pr_body +Bump integration version - \`$NEXT_INTEGRATION_VERSION\` - export PR_URL="$(gh pr create --title "[Cloud Security] Bump integration" \ - --body "Bumps integration to new version (Automated PR)" \ +> [!NOTE] +> This is an automated PR +EOF + + export PR_URL="$(gh pr create --title "[TEST][Cloud Security] Bump integration - DO NOT MERGE" \ + --body-file pr_body \ --base "main" \ --head "$BRANCH" \ --label "enhancement" \