diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8e80d26..da1e23c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,6 +14,7 @@ jobs: matrix: features: - aem-sdk + - aem-repo-tool baseImage: - mcr.microsoft.com/devcontainers/base:debian - mcr.microsoft.com/devcontainers/base:ubuntu diff --git a/README.md b/README.md index 2f70c85..2501545 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,6 @@ ## `aem-sdk` > You must have access to the AEM SDK. It is proprietary, and not distributed with the feature. This feature only facilitates setting up an author and publish server. Along with the dispatcher tools. See: [Developing AEM Inside a Dev Container](https://theaemmaven.com/post/developing-aem-inside-a-dev-container) + +## `aem-repo-tool` +> Installs the [AEM repo tool](https://github.com/Adobe-Marketing-Cloud/tools/tree/master/repo). \ No newline at end of file diff --git a/src/aem-repo-tool/devcontainer-feature.json b/src/aem-repo-tool/devcontainer-feature.json new file mode 100644 index 0000000..cf2ab07 --- /dev/null +++ b/src/aem-repo-tool/devcontainer-feature.json @@ -0,0 +1,20 @@ +{ + "id": "aem-repo-tool", + "version": "1.0.0", + "name": "Adobe Experience Manager Repo Tool", + "description": "Setup AEM repo tool, an FTP-like tool for JCR content.", + "options": { + "repoToolVersion": { + "type": "string", + "description": "Repo tool version.", + "default": "1.4" + } + }, + "containerEnv": { + "AEM_REPO_TOOL_FEATURE_DIR": "/aem-repo-tool", + "PATH": "/aem-repo-tool:${PATH}" + }, + "dependsOn": { + "ghcr.io/devcontainers/features/node:1": {} + } +} diff --git a/src/aem-repo-tool/install.sh b/src/aem-repo-tool/install.sh new file mode 100644 index 0000000..82da900 --- /dev/null +++ b/src/aem-repo-tool/install.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# create the feature directory +mkdir -p ${AEM_REPO_TOOL_FEATURE_DIR} + +REPO_TOOL_RELEASE="https://github.com/Adobe-Marketing-Cloud/tools/releases/download/repo-${REPOTOOLVERSION:-'1.4'}/repo" + +curl --location ${REPO_TOOL_RELEASE} --output "${AEM_REPO_TOOL_FEATURE_DIR}/repo" +chmod +x "${AEM_REPO_TOOL_FEATURE_DIR}/repo" diff --git a/test/aem-repo-tool/test.sh b/test/aem-repo-tool/test.sh new file mode 100644 index 0000000..978f5c6 --- /dev/null +++ b/test/aem-repo-tool/test.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# To run this test only, add the --skip-scenarios flag. +# +# devcontainer features test \ +# --features aem-repo-tool \ +# --skip-scenarios \ +# --base-image mcr.microsoft.com/devcontainers/base +# + +set -e + +# Optional: Import test library bundled with the devcontainer CLI +source dev-container-features-test-lib + +# Feature-specific tests +# The 'check' command comes from the dev-container-features-test-lib. + +check "execute repo with --help flag" \ + repo --help | cat - | grep Usage: + +# Report result +# If any of the checks above exited with a non-zero exit code, the test will fail. +reportResults