Skip to content

Commit

Permalink
Add repo tool feature
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-ayala committed Sep 12, 2024
1 parent be94260 commit 5057550
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
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 5057550

Please sign in to comment.