Skip to content

Commit

Permalink
feat: eicar rock example
Browse files Browse the repository at this point in the history
  • Loading branch information
clay-lake committed Aug 16, 2024
1 parent 6a9af2f commit 6ed7470
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/Test_EICAR_Rock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build External Rock


on:
push:
paths:
- oci-factory_workflows/examples/Test_EICAR_Rock.yaml
workflow_dispatch:

jobs:
build:

uses: clay-lake/oci-factory/.github/workflows/Build-Rock.yaml@refactor-workflows
with:
oci-archive-name: "eicar-rock"
rock-repo: canonical/rocks-toolbox
rock-repo-commit: oci-factory_workflows
rockfile-directory: /oci-factory_workflows/rocks/eicar
arch-map: '{"amd64": "ubuntu-22.04"}'

# uses: clay-lake/oci-factory/.github/workflows/Test-Rock.yaml@refactor-workflows
# with:
# oci-archive-name: "eicar-rock"
13 changes: 12 additions & 1 deletion oci-factory_workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,15 @@ when calling this workflow. Alternatively, builds can be executed remotely on
the Launchpad CI platform if available.

**Examples:**
- Building an External Rock - ./examples/Build_External_Rock.yaml
- Building an External Rock - ./examples/Build_External_Rock.yaml


## Test-Rock

The Build-Rock workflow is capable of building multi architecture rocks. Github
Runners in the required target architecture must be available and configured
when calling this workflow. Alternatively, builds can be executed remotely on
the Launchpad CI platform if available.

**Examples:**
- Test an External Rock - ./examples/Test_External_Rock.yaml
19 changes: 19 additions & 0 deletions oci-factory_workflows/rocks/eicar/rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: eicar-rock
summary: A test rock to check malware scanners
description: An extension of the "Hello World" rock. This rock contains the EICAR test file to test if malware scanners are working as expected
version: "latest"
license: Apache-2.0

base: [email protected]
platforms:
amd64:

parts:
hello:
plugin: nil
stage-packages:
- hello
eicar:
plugin: dump
source-type: file
source: src/eicar
1 change: 1 addition & 0 deletions oci-factory_workflows/rocks/eicar/src/eicar
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

0 comments on commit 6ed7470

Please sign in to comment.