Skip to content

Commit 80433f1

Browse files
committed
fixing some code review comments plus firewall removal action fix
1 parent 4e8ad63 commit 80433f1

3 files changed

Lines changed: 23 additions & 12 deletions

File tree

.github/actions/update-firewall-rule/action.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: Update Storage Firewall Rule
1+
# from https://github.com/prgs-community/githubactions-reusableworkflow-evcodesign/tree/main/.github/actions/update-firewall-rule
2+
name: Update Firewall Rule
23
description: Update Firewall Rule by adding or removing runner ip.
34
inputs:
45
action-to-execute:
@@ -12,8 +13,18 @@ runs:
1213
shell: bash
1314
run: |
1415
AgentPublicIp=$(curl checkip.amazonaws.com)
15-
echo "##[warning]Adding $AgentPublicIp To Storage Account Firewall, Please Wait..."
16-
az network nsg rule update -n HTTPS_CI --nsg-name vmsonarqubeprod001-nsg -g rg-prgssonarqube-prod-001 --add sourceAddressPrefixes $AgentPublicIp
16+
echo "##[warning]${{ inputs.action-to-execute }}ing $AgentPublicIp To Storage Account Firewall, Please Wait..."
17+
az network nsg rule update -n HTTPS_CI --nsg-name vmsonarqubeprod001-nsg -g rg-prgssonarqube-prod-001 --${{ inputs.action-to-execute }} sourceAddressPrefixes $AgentPublicIp
1718
sleep 30
19+
# was echo "##[warning]Adding $AgentPublicIp To Storage Account Firewall, Please Wait..."
1820
# was AgentPublicIp=$(curl ipconfig.io) which returned a 522/timeout error, so switched to checkip.amazonaws.com
19-
21+
# az network nsg rule update -n HTTPS_CI --nsg-name vmsonarqubeprod001-nsg -g rg-prgssonarqube-prod-001 --add sourceAddressPrefixes $AgentPublicIp
22+
23+
# pwsh version az keyvault network-rule ${{ inputs.action-to-execute }} --name caps-evcodesign-useast --ip-address $AgentPublicIp
24+
25+
# shell: pwsh
26+
# run: |
27+
# $AgentPublicIp = Invoke-RestMethod https://ipinfo.io/json | Select -ExpandProperty Ip
28+
# Write-Host "##[warning]${{ inputs.action-to-execute }}ing $AgentPublicIp To Storage Account Firewall, Please Wait..."
29+
# az keyvault network-rule ${{ inputs.action-to-execute }} --name caps-evcodesign-useast --ip-address $AgentPublicIp
30+
# Start-Sleep -Seconds 20

.github/workflows/stubs/ci-main-pull-request-stub-trufflehog-only.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# stub to call common GitHub Action (GA) as part of Continuous Integration (CI) Pull Request process checks for main branch
22
#
3-
# inputs are described in the <org>/common-github-actions/<GA.yml> with same name as this stub
3+
# inputs are described in the chef/common-github-actions/<GA.yml> with same name as this stub
44
#
55

66
name: CI Pull Request on Main Branch
@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727
- name: echo version of stub and inputs
2828
run: |
29-
echo "[ci-main-pull-request-stub-trufflehog-only.yml] version $STUB_VERSION"
29+
echo "CI main pull request stub version $STUB_VERSION"
3030
3131
call-ci-main-pr-check-pipeline:
3232
uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@main
@@ -51,7 +51,7 @@ jobs:
5151
# requires secrets POLARIS_SERVER_URL and POLARIS_ACCESS_TOKEN
5252
perform-blackduck-polaris: false
5353
polaris-application-name: 'Chef-Chef360' # one of these: Chef-Agents, Chef-Automate, Chef-Chef360, Chef-Habitat, Chef-Infrastructure-Server, Chef-Shared-Services
54-
polaris-project-name: ${{ github.event.repository.name }} # typically the application name, followed by - and the repository name, for example Chef-Chef360-chef-vault'
54+
polaris-project-name: Chef-Automate-${{ github.event.repository.name }} # typically the application name, followed by - and the repository name, for example Chef-Automate-chef-vault
5555
perform-blackduck-sca-scan: false
5656

5757
# perform application build and unit testing, will use custom repository properties when implemented for chef-primary-application, chef-build-profile, and chef-build-language
@@ -60,7 +60,7 @@ jobs:
6060
# language: $chef-ga-build-language # this will be removed from stub as autodetected in central GA
6161
unit-tests: false
6262

63-
# perform SonarQube scan, with or wihout unit test coverage data
63+
# perform SonarQube scan, with or without unit test coverage data
6464
# requires secrets SONAR_TOKEN and SONAR_HOST_URL (progress.sonar.com)
6565
perform-sonarqube-scan: false
6666
# perform-sonar-build: true

.github/workflows/stubs/ci-main-pull-request-stub.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# stub to call common GitHub Action (GA) as part of Continuous Integration (CI) Pull Request process checks for main branch
2-
# inputs are described in the <org>/common-github-actions/<GA.yml> with same name as this stub
2+
# inputs are described in the chef/common-github-actions/<GA.yml> with same name as this stub
33
#
44
# secrets are inherited from the calling workflow, typically SONAR_TOKEN, SONAR_HOST_URL, GH_TOKEN, AKEYLESS_JWT_ID
55

@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727
- name: echo version of stub and inputs
2828
run: |
29-
echo "[ci-main-pull-request-stub.yml] version $STUB_VERSION"
29+
echo "CI main pull request stub version $STUB_VERSION"
3030
3131
call-ci-main-pr-check-pipeline:
3232
uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@main
@@ -51,15 +51,15 @@ jobs:
5151
# requires secrets POLARIS_SERVER_URL and POLARIS_ACCESS_TOKEN
5252
perform-blackduck-polaris: true
5353
polaris-application-name: 'Chef-Chef360' # one of these: Chef-Agents, Chef-Automate, Chef-Chef360, Chef-Habitat, Chef-Infrastructure-Server, Chef-Shared-Services
54-
polaris-project-name: ${{ polaris_application_name }}-${{ github.event.repository.name }} # typically the application name, followed by - and the repository name, for example Chef-Chef360-chef-vault'
54+
polaris-project-name: ${{ polaris_application_name }}-${{ github.event.repository.name }} # typically the application name, followed by - and the repository name, for example Chef-Chef360-chef-vault
5555
perform-blackduck-sca-scan: true
5656

5757
# perform application build and unit testing, will use custom repository properties when implemented for chef-primary-application, chef-build-profile, and chef-build-language
5858
build: true
5959
language: 'Ruby' # Go, Ruby, Rust
6060
unit-tests: false
6161

62-
# perform SonarQube scan, withor wihout unit test coverage data
62+
# perform SonarQube scan, withor without unit test coverage data
6363
# requires secrets SONAR_TOKEN and SONAR_HOST_URL (progress.sonar.com)
6464
perform-sonarqube-scan: true
6565
perform-sonar-build: true

0 commit comments

Comments
 (0)