forked from SovereignCloudStack/standards
-
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.
Check REGIO.cloud RegionA (SovereignCloudStack#263)
Signed-off-by: Christian Berendt <[email protected]>
- Loading branch information
Showing
4 changed files
with
75 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "Compliance of regio-a" | ||
|
||
on: | ||
# Trigger compliance check every day at 4:30 UTC | ||
schedule: | ||
- cron: '30 4 * * *' | ||
# Trigger compliance check after Docker image has been built | ||
workflow_run: | ||
workflows: [Build and publish scs-compliance-check Docker image] | ||
types: | ||
- completed | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-regio-a: | ||
uses: ./.github/workflows/scs-compliance-check-with-application-credential.yml | ||
with: | ||
version: v2 | ||
layer: iaas | ||
cloud: "regio-a" | ||
secret_name: "OS_PASSWORD_REGIO_A" | ||
secrets: inherit |
43 changes: 43 additions & 0 deletions
43
.github/workflows/scs-compliance-check-with-application-credential.yml
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Check compliance of SCS cloud | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
required: true | ||
type: string | ||
layer: | ||
required: true | ||
type: string | ||
cloud: | ||
required: true | ||
type: string | ||
secret_name: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
scs-compliance-check: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/sovereigncloudstack/scs-compliance-check:main | ||
steps: | ||
- name: "Get clouds.yaml" | ||
run: "mkdir /etc/openstack && wget -P /etc/openstack https://raw.githubusercontent.com/sovereigncloudstack/standards/main/.github/scs-compliance-check/openstack/clouds.yaml" | ||
- name: "Create secure.yaml" | ||
run: | | ||
cat << EOF > /etc/openstack/secure.yaml | ||
clouds: | ||
${{ inputs.cloud }}: | ||
auth: | ||
application_credential_secret: ${{ secrets[inputs.secret_name] }} | ||
EOF | ||
- name: "Run scs-compliance-check" | ||
run: "cd /scs-compliance && ./scs-compliance-check.py scs-compatible.yaml --version ${{ inputs.version }} ${{ inputs.layer }} -o result.yaml" | ||
env: | ||
OS_CLOUD: ${{ inputs.cloud }} | ||
- name: "Upload results" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: result | ||
path: /scs-compliance/result.yaml |
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