forked from elastic/cloudbeat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
49 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
name: Update Integration | ||
|
||
on: | ||
push: | ||
# push: | ||
# branches: | ||
# - main | ||
create: | ||
branches: | ||
- main | ||
# create: | ||
# branches: | ||
# # whenever a new release branch is created, this workflow will be triggered | ||
# - "[0-9].[0-9]+" | ||
- "[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
# extract-version: | ||
|
@@ -26,52 +25,57 @@ jobs: | |
# echo "version=$version" >> $GITHUB_OUTPUT | ||
# echo "Version is $version" | ||
|
||
modify-integration: | ||
# needs: extract-version | ||
zoo: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Integrations repo | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.FORK_TOKEN }} | ||
repository: orouz/integrations | ||
ref: main | ||
|
||
- name: Update URLs | ||
- name: a | ||
run: | | ||
manifest_file_path="packages/cloud_security_posture/manifest.yml" | ||
echo "manifest_file_path is $manifest_file_path" | ||
echo "branch name: ${{ github.head_ref || github.ref_name }}" | ||
# modify-integration: | ||
# # needs: extract-version | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Checkout Integrations repo | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# token: ${{ secrets.FORK_TOKEN }} | ||
# repository: orouz/integrations | ||
# ref: main | ||
|
||
# - name: Update URLs | ||
# run: | | ||
# MANIFEST_PATH="packages/cloud_security_posture/manifest.yml" | ||
|
||
# new_version="${{ needs.extract-version.outputs.stack_version }}" | ||
new_version="5.5.5" | ||
echo "new_version is $new_version" | ||
# # VERSION="${{ needs.extract-version.outputs.stack_version }}" | ||
# VERSION="5.5.5" | ||
|
||
MINOR_VERSION=$(echo $new_version | cut -d '.' -f1,2) | ||
echo "MINOR_VERSION is $MINOR_VERSION" | ||
# MINOR_VERSION=$(echo $VERSION | cut -d '.' -f1,2) | ||
# echo "MINOR_VERSION is $MINOR_VERSION" | ||
|
||
PATCH_VERSION=$new_version | ||
echo "PATCH_VERSION is $PATCH_VERSION" | ||
# PATCH_VERSION=$VERSION | ||
# echo "PATCH_VERSION is $PATCH_VERSION" | ||
|
||
# gcp | ||
sed -i'' -E "s/cloudshell_git_branch=[0-9]+\.[0-9]+/cloudshell_git_branch=$MINOR_VERSION/g" $manifest_file_path | ||
# # cis_gcp | ||
# sed -i'' -E "s/cloudshell_git_branch=[0-9]+\.[0-9]+/cloudshell_git_branch=$MINOR_VERSION/g" $MANIFEST_PATH | ||
|
||
# aws | ||
sed -i'' -E "s/cloudformation-cnvm-[0-9]+\.[0-9]+\.[0-9]+/cloudformation-cnvm-$PATCH_VERSION/g" $manifest_file_path | ||
sed -i'' -E "s/cloudformation-cspm-ACCOUNT_TYPE-[0-9]+\.[0-9]+\.[0-9]+/cloudformation-cspm-ACCOUNT_TYPE-$PATCH_VERSION/g" $manifest_file_path | ||
# # cis_aws + vuln_mgmt_aws | ||
# sed -i'' -E "s/cloudformation-cnvm-[0-9]+\.[0-9]+\.[0-9]+/cloudformation-cnvm-$PATCH_VERSION/g" $MANIFEST_PATH | ||
# sed -i'' -E "s/cloudformation-cspm-ACCOUNT_TYPE-[0-9]+\.[0-9]+\.[0-9]+/cloudformation-cspm-ACCOUNT_TYPE-$PATCH_VERSION/g" $MANIFEST_PATH | ||
|
||
# azure | ||
sed -i'' -E "s/cloudbeat%2F[0-9]+\.[0-9]+/cloudbeat%2F$PATCH_VERSION/g" $manifest_file_path | ||
# # cis_azure | ||
# sed -i'' -E "s/cloudbeat%2F[0-9]+\.[0-9]+/cloudbeat%2F$PATCH_VERSION/g" $MANIFEST_PATH | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
id: cpr | ||
with: | ||
token: ${{ secrets.FORK_TOKEN }} | ||
commit-message: "Update manifest template versions" | ||
branch: "update-cloudbeat-integration" | ||
title: "[Cloud Security] Update manifest template versions" | ||
body: "Automated PR" | ||
base: ${{ env.branch }} | ||
committer: "Elastic Machine <[email protected]>" | ||
author: "Elastic Machine <[email protected]>" | ||
# - name: Create Pull Request | ||
# uses: peter-evans/create-pull-request@v4 | ||
# id: cpr | ||
# with: | ||
# token: ${{ secrets.FORK_TOKEN }} | ||
# commit-message: "Update manifest template versions" | ||
# branch: "update-cloudbeat-integration" | ||
# title: "[Cloud Security] Update manifest template versions" | ||
# body: "Automated PR" | ||
# base: ${{ env.branch }} | ||
# committer: "Elastic Machine <[email protected]>" | ||
# author: "Elastic Machine <[email protected]>" |