Skip to content

Commit

Permalink
Merge pull request #12 from juan-ayala/feature/aem-repo-tool
Browse files Browse the repository at this point in the history
[aem-repo-tool] Add new feature to install the repo tool
  • Loading branch information
juan-ayala committed Sep 12, 2024
2 parents a3a7b68 + 0b966ea commit b18675e
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
20 changes: 20 additions & 0 deletions src/aem-repo-tool/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
9 changes: 9 additions & 0 deletions src/aem-repo-tool/install.sh
Original file line number Diff line number Diff line change
@@ -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"
24 changes: 24 additions & 0 deletions test/aem-repo-tool/test.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b18675e

Please sign in to comment.