diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d002820..10b6c74 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,7 +17,6 @@ concurrency: cancel-in-progress: true jobs: - detect-changes: if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest @@ -28,7 +27,6 @@ jobs: id: filter with: filters: | - dagger-cue: ./**/dagger-cue/** golangci-lint: ./**/golangci-lint/** gomarkdoc: ./**/gomarkdoc/** goreleaser: ./**/goreleaser/** @@ -87,7 +85,6 @@ jobs: strategy: matrix: features: - - dagger-cue - golangci-lint - gomarkdoc - goreleaser @@ -119,7 +116,6 @@ jobs: strategy: matrix: features: - - dagger-cue - golangci-lint - gomarkdoc - goreleaser diff --git a/src/dagger-cue/NOTES.md b/src/dagger-cue/NOTES.md deleted file mode 100644 index feb323f..0000000 --- a/src/dagger-cue/NOTES.md +++ /dev/null @@ -1,9 +0,0 @@ - - -## Supported platforms - -`linux/amd64` and `linux/arm64` platforms `debian`, `ubuntu` and `alpine`. - -## References - -- dagger: diff --git a/src/dagger-cue/README.md b/src/dagger-cue/README.md deleted file mode 100644 index e36609c..0000000 --- a/src/dagger-cue/README.md +++ /dev/null @@ -1,33 +0,0 @@ - -# dagger-cue (dagger-cue) - -Installs dagger CI/CD engine that runs your pipelines in containers. - -## Example Usage - -```json -"features": { - "ghcr.io/guiyomh/features/dagger-cue:0": {} -} -``` - -## Options - -| Options Id | Description | Type | Default Value | -|-----|-----|-----|-----| -| version | Select version of dagger. | string | latest | - - - -## Supported platforms - -`linux/amd64` and `linux/arm64` platforms `debian`, `ubuntu` and `alpine`. - -## References - -- dagger: - - ---- - -_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/guiyomh/features/blob/main/src/dagger-cue/devcontainer-feature.json). Add additional notes to a `NOTES.md`._ diff --git a/src/dagger-cue/devcontainer-feature.json b/src/dagger-cue/devcontainer-feature.json deleted file mode 100644 index c420da3..0000000 --- a/src/dagger-cue/devcontainer-feature.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "dagger-cue", - "id": "dagger-cue", - "version": "0.0.1", - "description": "Installs dagger CI/CD engine that runs your pipelines in containers.", - "documentationURL": "https://github.com/guiyomh/features/tree/main/src/dagger-cue", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "0.2.232" - ], - "default": "latest", - "description": "Select version of dagger." - } - } -} diff --git a/src/dagger-cue/install.sh b/src/dagger-cue/install.sh deleted file mode 100755 index c2eca28..0000000 --- a/src/dagger-cue/install.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/env bash - -DAGGER_VERSION=${VERSION:-"latest"} - -set -e - -# shellcheck source=/dev/null -source /etc/os-release - -# Clean up -cleanup() { -case "${ID}" in - debian|ubuntu) - rm -rf /var/lib/apt/lists/* - ;; - esac -} - -cleanup - -if [ "$(id -u)" -ne 0 ]; then - echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' - exit 1 -fi - -apt_get_update() { - case "${ID}" in - debian|ubuntu) - if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then - echo "Running apt-get update..." - apt-get update -y - fi - ;; - esac -} - -check_git() { - if [ ! -x "$(command -v git)" ]; then - check_packages git - fi -} - -# Checks if packages are installed and installs them if not -check_packages() { - case "${ID}" in - debian|ubuntu) - if ! dpkg -s "$@" >/dev/null 2>&1; then - apt_get_update - apt-get -y install --no-install-recommends "$@" - fi - ;; - alpine) - if ! apk -e info "$@" >/dev/null 2>&1; then - apk add --no-cache "$@" - fi - ;; - esac -} - -find_version_from_git_tags() { - local variable_name=$1 - local requested_version=${!variable_name} - if [ "${requested_version}" = "none" ]; then return; fi - - if [ "$(echo "${requested_version}" | grep -o "." | wc -l)" != "2" ]; then - local version_list - check_git - check_packages ca-certificates - version_list="$(git ls-remote --tags https://github.com/dagger/dagger | grep -oP "sdk/cue/v\K[0-9]+\\.[0-9]+\\.[0-9]+" | tr -d ' ' | sort -rV)" - if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "current" ] || [ "${requested_version}" = "lts" ]; then - declare -g "${variable_name}"="$(echo "${version_list}" | head -n 1)" - else - set +e - declare -g "${variable_name}"="$(echo "${version_list}" | grep -E -m 1 "^${requested_version//./\\.}([\\.\\s]|$)")" - set -e - fi - fi - if [ -z "${!variable_name}" ] || ! echo "${version_list}" | grep "^${!variable_name//./\\.}$" >/dev/null 2>&1; then - echo -e "Invalid ${variable_name} value: ${requested_version}\nValid values:\n${version_list}" >&2 - exit 1 - fi - echo "${variable_name}=${!variable_name}" -} - -find_version_from_git_tags DAGGER_VERSION - -export DEBIAN_FRONTEND=noninteractive - -check_packages curl ca-certificates -echo "Downloading dagger..." - -cd /usr/local -curl -L https://dl.dagger.io/dagger-cue/install.sh | VERSION="${DAGGER_VERSION}" sh - -dagger-cue version - -# Clean up -cleanup - -echo "Done!" diff --git a/src/gomarkdoc/devcontainer-feature.json b/src/gomarkdoc/devcontainer-feature.json index 49dfd01..60e6a09 100644 --- a/src/gomarkdoc/devcontainer-feature.json +++ b/src/gomarkdoc/devcontainer-feature.json @@ -1,22 +1,22 @@ { - "id": "gomarkdoc", - "version": "0.1.0", - "name": "gomarkdoc", - "description":" formats documentation for one or more packages as markdown.", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "0.4.1", - "0.4.0", - "0.3.2" - ], - "default": "latest", - "description": "Select or enter a gomarkdoc version to install" - } - }, - "installAfter": [ - "ghcr.io/devcontainers/features/go" - ] -} + "id": "gomarkdoc", + "version": "0.1.0", + "name": "gomarkdoc", + "description": " formats documentation for one or more packages as markdown.", + "options": { + "version": { + "type": "string", + "proposals": [ + "latest", + "0.4.1", + "0.4.0", + "0.3.2" + ], + "default": "latest", + "description": "Select or enter a gomarkdoc version to install" + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/go" + ] +} \ No newline at end of file diff --git a/src/goreleaser/devcontainer-feature.json b/src/goreleaser/devcontainer-feature.json index af5b0d8..e43f88c 100644 --- a/src/goreleaser/devcontainer-feature.json +++ b/src/goreleaser/devcontainer-feature.json @@ -1,24 +1,24 @@ { - "id": "goreleaser", - "version": "0.1.1", - "name": "goreleaser", - "description":"Install Goreleaser, to release Go projects as fast and easily as possible!", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "v1.12.3", - "v1.11.2", - "v1.10.3", - "v1.9.2", - "v1.8.3" - ], - "default": "latest", - "description": "Select or enter a goreleaser version to install" - } - }, - "installAfter": [ - "ghcr.io/devcontainers/features/go" - ] -} + "id": "goreleaser", + "version": "0.1.1", + "name": "goreleaser", + "description": "Install Goreleaser, to release Go projects as fast and easily as possible!", + "options": { + "version": { + "type": "string", + "proposals": [ + "latest", + "v1.12.3", + "v1.11.2", + "v1.10.3", + "v1.9.2", + "v1.8.3" + ], + "default": "latest", + "description": "Select or enter a goreleaser version to install" + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/go" + ] +} \ No newline at end of file diff --git a/src/gotestsum/devcontainer-feature.json b/src/gotestsum/devcontainer-feature.json index 026bdad..39497e1 100644 --- a/src/gotestsum/devcontainer-feature.json +++ b/src/gotestsum/devcontainer-feature.json @@ -1,22 +1,22 @@ { - "id": "gotestsum", - "version": "0.1.1", - "name": "gotestsum", - "description":"Install a pretty test runner", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "v1.8.2", - "v1.7.0", - "v1.6.4" - ], - "default": "latest", - "description": "Select or enter a gotestsum version to install" - } - }, - "installAfter": [ - "ghcr.io/devcontainers/features/go" - ] -} + "id": "gotestsum", + "version": "0.1.1", + "name": "gotestsum", + "description": "Install a pretty test runner", + "options": { + "version": { + "type": "string", + "proposals": [ + "latest", + "v1.8.2", + "v1.7.0", + "v1.6.4" + ], + "default": "latest", + "description": "Select or enter a gotestsum version to install" + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/go" + ] +} \ No newline at end of file diff --git a/src/mage/devcontainer-feature.json b/src/mage/devcontainer-feature.json index 67901ec..113ac23 100644 --- a/src/mage/devcontainer-feature.json +++ b/src/mage/devcontainer-feature.json @@ -1,22 +1,22 @@ { - "id": "mage", - "version": "0.1.0", - "name": "mage", - "description":"a Make/rake-like dev tool using Go", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest", - "1.14.0", - "1.13.0", - "1.12.1" - ], - "default": "latest", - "description": "Select or enter a mage version to install" - } - }, - "installAfter": [ - "ghcr.io/devcontainers/features/go" - ] -} + "id": "mage", + "version": "0.1.0", + "name": "mage", + "description": "a Make/rake-like dev tool using Go", + "options": { + "version": { + "type": "string", + "proposals": [ + "latest", + "1.14.0", + "1.13.0", + "1.12.1" + ], + "default": "latest", + "description": "Select or enter a mage version to install" + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/go" + ] +} \ No newline at end of file diff --git a/src/pact-go/devcontainer-feature.json b/src/pact-go/devcontainer-feature.json index 9bd07d5..47c3ac3 100644 --- a/src/pact-go/devcontainer-feature.json +++ b/src/pact-go/devcontainer-feature.json @@ -1,28 +1,28 @@ { - "id": "pact-go", - "version": "0.1.1", - "name": "pact-go", - "description":"Configure Pact, to do contract testing with golang. Checks versions of required Pact CLI tools for used by the library.", - "options": { - "version": { - "type": "string", - "proposals": [ - "2.0.0-beta.10", - "2.0.0-beta.9", - "2.0.0-beta.8", - "2.0.0-beta.7", - "2.0.0-beta.6", - "2.0.0-beta.5", - "2.0.0-beta.4", - "2.0.0-beta.3", - "2.0.0-beta.2", - "2.0.0-beta.1" - ], - "default": "2.0.0-beta.10", - "description": "Select or enter a pact-go version to install" - } - }, - "installAfter": [ - "ghcr.io/devcontainers/features/go" - ] -} + "id": "pact-go", + "version": "0.1.1", + "name": "pact-go", + "description": "Configure Pact, to do contract testing with golang. Checks versions of required Pact CLI tools for used by the library.", + "options": { + "version": { + "type": "string", + "proposals": [ + "2.0.0-beta.10", + "2.0.0-beta.9", + "2.0.0-beta.8", + "2.0.0-beta.7", + "2.0.0-beta.6", + "2.0.0-beta.5", + "2.0.0-beta.4", + "2.0.0-beta.3", + "2.0.0-beta.2", + "2.0.0-beta.1" + ], + "default": "2.0.0-beta.10", + "description": "Select or enter a pact-go version to install" + } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/go" + ] +} \ No newline at end of file diff --git a/test/dagger-cue/test.sh b/test/dagger-cue/test.sh deleted file mode 100644 index 6c3d42c..0000000 --- a/test/dagger-cue/test.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -set -e - -apt_get_update() { - case "${ID}" in - debian|ubuntu) - if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then - echo "Running apt-get update..." - apt-get update -y - fi - ;; - esac -} - -# Checks if packages are installed and installs them if not -check_packages() { - case "${ID}" in - debian|ubuntu) - if ! dpkg -s "$@" >/dev/null 2>&1; then - apt_get_update - apt-get -y install --no-install-recommends "$@" - fi - ;; - alpine) - if ! apk -e info "$@" >/dev/null 2>&1; then - apk add --no-cache "$@" - fi - ;; - esac -} - -cleanup() { -case "${ID}" in - debian|ubuntu) - rm -rf /var/lib/apt/lists/* - ;; - esac -} - -# Clean up -cleanup - -check_packages git -LATEST_VERSION="$(git ls-remote --tags https://github.com/dagger/dagger | grep -oP "sdk/cue/v\K[0-9]+\\.[0-9]+\\.[0-9]+" | sort -V | tail -n 1)" - -# shellcheck source=/dev/null -source dev-container-features-test-lib - -# Feature-specific tests -check "version" dagger-cue version | grep "${LATEST_VERSION}" - -# Report result -reportResults