Skip to content

Commit

Permalink
Upgrade Alpha release: Updated the formatted version in the examples'…
Browse files Browse the repository at this point in the history
… zip file name and removed old version-less zip files [skip actions]
  • Loading branch information
lindanasredin committed Oct 15, 2023
1 parent d6494e3 commit 19be4ee
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 21 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,23 @@ jobs:
terraform_wrapper: false
terraform_version: ~1.6.0

- name: Format version for zip file name
run: |
version="${{ github.event.inputs.future_release }}"
formatted_version=${version//./_}
echo "FORMATTED_VERSION=$formatted_version" >> $GITHUB_OUTPUT
id: format-version

- name: Update modules' versions in examples
run: |
find ./examples/ -type f -exec sed -i 's;.*latest release tag.*;version="'${{ github.event.inputs.future_release }}'" # latest release tag;' {} \;
- name: Update READMEs
run: |
echo "Formatted version: ${{ steps.format-version.outputs.FORMATTED_VERSION }}"
find . -type f -name 'README.md' -exec sed -E -i 's;github.com/imperva/dsfkit/tree/([0-9]*\.){2}[0-9]*;github.com/imperva/dsfkit/tree/'${{ github.event.inputs.future_release }}';g' {} \;
find . -type f -name 'README.md' -exec sed -E -i 's;github.com/imperva/dsfkit/raw/([0-9]*\.){2}[0-9]*;github.com/imperva/dsfkit/raw/'${{ github.event.inputs.future_release }}';g' {} \;
find . -type f -name 'README.md' -exec sed -E -i '/\/examples\// s;([0-9]+_){2}[0-9]+\.zip;${{ steps.format-version.outputs.FORMATTED_VERSION }}\.zip;g' {} \;
- name: Update installer machine link
run: |
Expand All @@ -90,16 +99,8 @@ jobs:
run: |
terraform fmt -recursive
- name: Format version for zip file name
run: |
version="${{ github.event.inputs.future_release }}"
formatted_version=${version//./_}
echo "FORMATTED_VERSION=$formatted_version" >> $GITHUB_OUTPUT
id: format-version

- name: Zip per examples
run: |
echo "Formatted version: ${{ steps.format-version.outputs.FORMATTED_VERSION }}"
for d in $(find ./examples -type d -links 2); do _d=$(dirname ${d}); _b=$(basename ${d}); pushd $_d; zip -FSr ${_b}/${_b}_${{ steps.format-version.outputs.FORMATTED_VERSION }}.zip ${_b} -x "*.zip"; popd; done
- name: Zip Sonar python upgrader
Expand Down
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ For more details about each example, click on the example name.
</td>
<td>A DSF deployment with a DSF Hub, an Agentless Gateway, federation, networking and onboarding of a MySQL DB.
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/sonar_basic_deployment/sonar_basic_deployment.zip">sonar_basic_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/sonar_basic_deployment/sonar_basic_deployment_1_5_5.zip">sonar_basic_deployment_1_5_5.zip</a>
</td>
</tr>
<tr>
Expand All @@ -480,7 +480,7 @@ For more details about each example, click on the example name.
</td>
<td>A DSF deployment with a DSF Hub, an Agentless Gateway, DSF Hub and Agentless Gateway HADR, federation, networking and onboarding of a MySQL DB.
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/sonar_hadr_deployment/sonar_hadr_deployment.zip">sonar_hadr_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/sonar_hadr_deployment/sonar_hadr_deployment_1_5_5.zip">sonar_hadr_deployment_1_5_5.zip</a>
</td>
</tr>
<tr>
Expand All @@ -490,7 +490,7 @@ For more details about each example, click on the example name.
</td>
<td>A DSF deployment with a DSF Hub HADR, an Agentless Gateway and federation. The DSF nodes (Hubs and Agentless Gateway) are in the same AWS account and the same region. It is mandatory to provide as input to this example the subnets to deploy the DSF nodes on.
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/sonar_single_account_deployment/sonar_single_account_deployment.zip">sonar_single_account_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/sonar_single_account_deployment/sonar_single_account_deployment_1_5_5.zip">sonar_single_account_deployment_1_5_5.zip</a>
</td>
</tr>
<tr>
Expand All @@ -500,7 +500,7 @@ For more details about each example, click on the example name.
</td>
<td>A DSF deployment with a DSF Hub, an Agentless Gateway and federation. The DSF nodes (Hub and Agentless Gateway) are in different AWS accounts. It is mandatory to provide as input to this example the subnets to deploy the DSF nodes on.
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/sonar_multi_account_deployment/sonar_multi_account_deployment.zip">sonar_multi_account_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/sonar_multi_account_deployment/sonar_multi_account_deployment_1_5_5.zip">sonar_multi_account_deployment_1_5_5.zip</a>
</td>
</tr>
<tr>
Expand All @@ -510,7 +510,7 @@ For more details about each example, click on the example name.
</td>
<td>A full DSF deployment with DSF Hub and Agentless Gateways (formerly Sonar), DAM (MX and Agent Gateways), DRA (Admin and DRA Analytics), and Agent and Agentless audit sources.
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/dsf_deployment/dsf_deployment.zip">dsf_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/dsf_deployment/dsf_deployment_1_5_5.zip">dsf_deployment_1_5_5.zip</a>
</td>
</tr>
<tr>
Expand All @@ -520,7 +520,17 @@ For more details about each example, click on the example name.
</td>
<td>A full DSF deployment with DSF Hub and Agentless Gateways (formerly Sonar), DAM (MX and Agent Gateways) and DRA (Admin and DRA Analytics).
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/dsf_single_account_deployment/dsf_single_account_deployment.zip">dsf_single_account_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/dsf_single_account_deployment/dsf_single_account_deployment_1_5_5.zip">dsf_single_account_deployment_1_5_5.zip</a>
</td>
</tr>
<tr>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/sonar_upgrade/README.md">Sonar Upgrade (Alpha)</a>
</td>
<td>All
</td>
<td>Upgrade of DSF Hub and Agentless Gateway (formerly Sonar).
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/sonar_upgrade/sonar_upgrade_1_5_5.zip">sonar_upgrade_1_5_5.zip</a>
</td>
</tr>
</table>
Expand Down Expand Up @@ -708,27 +718,27 @@ This mode is similar to the CLI mode except that the Terraform is run on an EC2
11. Download the zip file of the example you've chosen (See the [Choosing the Example/Recipe that Fits Your Use Case](#choosing-the-examplerecipe-that-fits-your-use-case) section) from the <a href="https://github.com/imperva/dsfkit/tree/1.5.6">eDSF Kit GitHub Repository</a>, e.g., if you choose the "sonar_basic_deployment" example, you should download <a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/sonar_basic_deployment/sonar_basic_deployment.zip">sonar_basic_deployment.zip</a>.
Run:
```bash
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/poc/sonar_basic_deployment/sonar_basic_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/poc/sonar_basic_deployment/sonar_basic_deployment_1_5_5.zip
or
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/poc/sonar_hadr_deployment/sonar_hadr_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/poc/sonar_hadr_deployment/sonar_hadr_deployment_1_5_5.zip
or
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/installation/sonar_single_account_deployment/sonar_single_account_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/installation/sonar_single_account_deployment/sonar_single_account_deployment_1_5_5.zip
or
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/installation/sonar_multi_account_deployment/sonar_multi_account_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/installation/sonar_multi_account_deployment/sonar_multi_account_deployment_1_5_5.zip
or
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/poc/dsf_deployment/dsf_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/poc/dsf_deployment/dsf_deployment_1_5_5.zip
or
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/installation/dsf_single_account_deployment/dsf_single_account_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/installation/dsf_single_account_deployment/dsf_single_account_deployment_1_5_5.zip
```
12. Continue by following the [CLI Deployment Mode](#cli-deployment-mode) beginning at step 2.
Expand Down
Binary file removed examples/azure/dsf_deployment/dsf_deployment.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed examples/poc/dsf_deployment/dsf_deployment.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/sonar_upgrade/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DSF Hub and Agentless Gateway Upgrade POC example
[![GitHub tag](https://img.shields.io/github/v/tag/imperva/dsfkit.svg)](https://github.com/imperva/dsfkit/tags)

A DSF Hub and Agentless Gateway (formerly Sonar) upgrade POC procedure.
A DSF Hub and Agentless Gateway (formerly Sonar) upgrade procedure.

This procedure consists of:

Expand Down

0 comments on commit 19be4ee

Please sign in to comment.