Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aem-repo-tool] Add new feature to install the repo tool #12

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading