Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

feat: add Namespace CLI via Github Releases #591

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
9a26366
fix(pipx-package): fix pipx inject command
koralowiec Sep 12, 2024
e2cbf55
Merge pull request #1 from devcontainers-extra/fix/pipx-package-injec…
koralowiec Sep 12, 2024
14df380
chore(devcontainer): stop and remove explainshell if it's running
koralowiec Sep 12, 2024
e1f135b
chore(devcontainer): bump versions and format
koralowiec Sep 12, 2024
caef344
Merge pull request #2 from devcontainers-extra/chore/fix-devcontainer…
koralowiec Sep 12, 2024
2b8fb38
fix(ci): set features to test for scheduled run
koralowiec Sep 13, 2024
ff76760
Merge pull request #4 from devcontainers-extra/fix/ci-test-scheduled
koralowiec Sep 13, 2024
c353ad7
fix(ansible): use devcontainers-extra/features/pipx-package:1.1.8
koralowiec Sep 12, 2024
a72b404
fix: swich to pipx-package-v1.1.8
koralowiec Sep 13, 2024
5146ec3
fix(brownie): remove redundant installation steps
koralowiec Sep 13, 2024
349e0f8
feat: add justfile with test command
koralowiec Sep 13, 2024
6c1b531
fix(ufmt): bump pipx-package version
koralowiec Sep 13, 2024
a55577b
fix(localstack): add system deps and bump version of pipx-package
koralowiec Sep 13, 2024
41cee27
feat: add justfile with test command
koralowiec Sep 13, 2024
0f5ae9b
fix(netdata): update URL for installation script
koralowiec Sep 13, 2024
36b75c4
Merge branch 'main' into fix/netdata
koralowiec Sep 13, 2024
c5b78f5
Merge pull request #3 from devcontainers-extra/fix/use-pipx-package-v…
koralowiec Sep 13, 2024
c0eb634
Merge pull request #5 from devcontainers-extra/fix/netdata
koralowiec Sep 13, 2024
cadfcf0
fix(azure-apiops): update regex for assets
koralowiec Sep 13, 2024
164e085
Merge pull request #6 from devcontainers-extra/fix/azure-apiops
koralowiec Sep 13, 2024
f2a16ce
feat: move failing feautres to archive
koralowiec Sep 14, 2024
89b2628
Merge pull request #7 from devcontainers-extra/feat/temporal-archive
koralowiec Sep 14, 2024
3625bb2
fix(ci): assign permissions permissions for publish step
koralowiec Sep 14, 2024
39f1022
Merge pull request #8 from devcontainers-extra/fix/ci-release-permiss…
koralowiec Sep 14, 2024
4ab36a1
feat: move failing features to archive
koralowiec Sep 14, 2024
fcfd18e
chore: archive tests of failing packages
koralowiec Sep 14, 2024
90ec520
Merge pull request #9 from devcontainers-extra/feat/temporal-archive-2
koralowiec Sep 14, 2024
679812d
chore(ansible): fix test scenario script
koralowiec Sep 28, 2024
64c5411
fix(pipx-package): don't alter main package version by using requirem…
koralowiec Sep 28, 2024
227529f
fix(ansible): bumb pipx-package version to 1.1.9
koralowiec Sep 28, 2024
a06164e
Merge pull request #44 from devcontainers-extra/fix/ansible-version-m…
koralowiec Sep 28, 2024
a6870f1
chore: add command to run filtered tests in justfile
koralowiec Sep 29, 2024
c998649
chore: add pre-commit config
koralowiec Sep 29, 2024
3602bf2
chore: fix trailing whitespaces
koralowiec Sep 29, 2024
23363a6
chore(gitignore): add output dir
koralowiec Sep 29, 2024
3092596
Merge pull request #45 from devcontainers-extra/chore/dev-env-enhance…
koralowiec Sep 29, 2024
f8d2cc0
chore: regenerate READMEs
koralowiec Sep 30, 2024
44435ec
chore: regenerate READMEs for archived features
koralowiec Sep 30, 2024
1deae90
Merge pull request #46 from devcontainers-extra/chore/update-feature-…
koralowiec Sep 30, 2024
6d19d48
chore: update issue templates
koralowiec Sep 30, 2024
118b67c
chore: update README
koralowiec Sep 30, 2024
3e2c060
chore: update LICENSE
koralowiec Sep 30, 2024
1730dad
Merge pull request #47 from devcontainers-extra/chore/update-boring-s…
koralowiec Sep 30, 2024
05d2886
Note that this is not officially related to the Devcontainers project
evilhamsterman Oct 8, 2024
41a688c
Fix typo
evilhamsterman Oct 9, 2024
a049a81
Merge pull request #48 from evilhamsterman/main
koralowiec Oct 9, 2024
63cc19e
chore: add unarchive command in justfile
koralowiec Oct 9, 2024
f7453e2
chore: unarchive gh-release
koralowiec Oct 9, 2024
c6ce786
fix(gh-release): update regex for a test scenario
koralowiec Oct 9, 2024
3fea7ff
Merge pull request #49 from devcontainers-extra/fix/gh-release-test-a…
koralowiec Oct 9, 2024
37b4134
fix(age): add additional asset regex
koralowiec Oct 9, 2024
0f52a8a
Merge pull request #50 from devcontainers-extra/fix/age
koralowiec Oct 9, 2024
38f904d
chore: add just command for creating feature from template
koralowiec Oct 13, 2024
ab15c30
feat: add aws-sso-cli feature
koralowiec Oct 13, 2024
d946acc
Merge pull request #51 from devcontainers-extra/feat/aws-sso-cli
koralowiec Oct 13, 2024
ef2f6a1
feat: add Namespace CLI via Github Releases
pl4nty Oct 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 15 additions & 12 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@
"customizations": {
"vscode": {
"extensions": [
"mads-hartmann.bash-ide-vscode",
"ms-python.python",
"ms-python.vscode-pylance",
"DavidAnson.vscode-markdownlint"
]
"mads-hartmann.bash-ide-vscode",
"ms-python.python",
"ms-python.vscode-pylance",
"DavidAnson.vscode-markdownlint",
"nefrob.vscode-just-syntax"
]
}
},
"features": {
"ghcr.io/devcontainers/features/python:1.1.0": {},
"ghcr.io/devcontainers/features/node:1.3.0": {},
"ghcr.io/devcontainers/features/github-cli:1.0.10": {},
"ghcr.io/devcontainers/features/docker-in-docker:2.5.0": {},
"ghcr.io/devcontainers/features/common-utils:2.1.2": {},
"ghcr.io/lukewiwa/features/shellcheck:0.2.3": {}

"ghcr.io/devcontainers/features/python:1.6.4": {},
"ghcr.io/devcontainers/features/node:1.6.0": {},
"ghcr.io/devcontainers/features/github-cli:1.0.13": {},
"ghcr.io/devcontainers/features/docker-in-docker:2.11.0": {},
"ghcr.io/devcontainers/features/common-utils:2.5.1": {},
"ghcr.io/lukewiwa/features/shellcheck:0.2.3": {},
"ghcr.io/guiyomh/features/just:0": {},
"ghcr.io/devcontainers-extra/features/pre-commit:2": {},
"ghcr.io/devcontainers-extra/features/tmux-homebrew:1": {}
},
"postCreateCommand": "/bin/bash -ex ./.devcontainer/setup.sh > postCreateCommand.log"
}
11 changes: 11 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,16 @@ npm install -g @devcontainers/cli

pipx install shfmt-py

# Check if the explainshell container is running
if [ "$(docker ps -q -f name=explainshell)" ]; then
# Stop the running container
docker stop explainshell
# Remove the container
docker rm explainshell
fi

# Run a new explainshell container
# this will add hover annotations in shell script files, assuming mads-hartmann.bash-ide-vscod is installed
docker container run --name explainshell --restart always -p 5000:5000 -d spaceinvaderone/explainshell

pre-commit install --install-hooks
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature-bug-report.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🐞Bug Report🐞
name: 🐞 Bug Report 🐞
description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage"]
Expand All @@ -11,13 +11,13 @@ body:
id: version
attributes:
label: Feature id and version
description: "For example: ghcr.io/devcontainers-contrib/features/deno:1.0.2"
description: "For example: ghcr.io/devcontainers-extra/features/deno:1.0.2"
validations:
required: false
- type: input
id: image
attributes:
label: Devcontainer base Image
label: Dev Container base Image
description: "For example: mcr.microsoft.com/devcontainers/base:ubuntu"
validations:
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/suggest-feature.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🔥Suggest a new Feature!🔥
name: 🔥 Suggest a new Feature! 🔥
description: Missing a feature? Ask and you shall receive!
title: "[Feature Request]: "
labels: ["enhancement"]
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/list-changed-features-action/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ runs:
with:
list-files: json
filters: |
src:
src:
- src/**/*.sh
test:
test:
- test/**/*.sh

- id: feature-finder
shell: bash
run: |
echo '${{ steps.filter.outputs.changes }}'

# prepare all features
all_features=$(sudo tree -J -d ./src | sudo jq -c '.[0].contents | map(.name)')

Expand All @@ -52,7 +52,7 @@ runs:
jq -sc '.[0] + .[1] | unique' changed_src_features.json changed_test_features.json > changed_features.json
changed_features=$(cat changed_features.json)

# outputs
# outputs
echo "all_features=$all_features" >> $GITHUB_OUTPUT
echo "changed_features=$changed_features" >> $GITHUB_OUTPUT

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
needs: [run-tests]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
packages: write
steps:
- uses: actions/checkout@v3

Expand All @@ -27,6 +31,6 @@ jobs:
publish-features: "true"
base-path-to-features: "./src"
generate-docs: "false"

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32 changes: 17 additions & 15 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ on:
- cron: '0 1 * * *'

pull_request:

push:
branches:
- main

jobs:

find-features:
Expand All @@ -44,10 +44,10 @@ jobs:
all-features: ${{ steps.list-features.outputs.all_features }}
changed-features: ${{ steps.list-features.outputs.changed_features }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- run: |
echo ${{ inputs.enabled }}
echo ${{ github.event_name }}
echo ${{ github.event_name }}

- id: list-features
uses: ./.github/actions/list-changed-features-action
Expand All @@ -63,26 +63,28 @@ jobs:
- name: "resolving features to test"
id: resolve_features
run: |
if [ ${{ github.event_name }} == 'pull_request' ]; then
if [ ${{ github.event_name }} == 'pull_request' ]; then
echo 'features_to_test=${{ needs.find-features.outputs.changed-features }}' >> $GITHUB_OUTPUT

elif [ ${{ github.event_name }} == 'push' ]; then
elif [ ${{ github.event_name }} == 'push' ]; then
echo 'features_to_test=${{ needs.find-features.outputs.changed-features }}' >> $GITHUB_OUTPUT

elif [ ${{ github.event_name }} == 'workflow_dispatch' ]; then

elif [ ${{ github.event_name }} == 'workflow_dispatch' ]; then
if [ ${{ inputs.on_changes_only }} == 'true' ]; then
echo 'features_to_test=${{ needs.find-features.outputs.changed-features }}' >> $GITHUB_OUTPUT
else
echo 'features_to_test=${{ needs.find-features.outputs.all-features }}' >> $GITHUB_OUTPUT
fi
elif [ ${{ github.event_name }} == 'workflow_call' ]; then

elif [ ${{ github.event_name }} == 'workflow_call' ]; then
if [ ${{ inputs.on_changes_only }} == 'true' ]; then
echo 'features_to_test=${{ needs.find-features.outputs.changed-features }}' >> $GITHUB_OUTPUT
else
echo 'features_to_test=${{ needs.find-features.outputs.all-features }}' >> $GITHUB_OUTPUT
fi
fi

elif [ ${{ github.event_name }} == 'schedule' ]; then
echo 'features_to_test=${{ needs.find-features.outputs.all-features }}' >> $GITHUB_OUTPUT
fi

- name: binning
Expand Down Expand Up @@ -140,12 +142,12 @@ jobs:

# install shellcheck
comma_separated_features=${{ matrix.features }}
for i in ${comma_separated_features//,/ }

for i in ${comma_separated_features//,/ }
do
shellcheck --severity=error -e SC2148 src/"$i"/*.sh
shellcheck --severity=error -e SC2148 src/"$i"/*.sh
done

test-global:
runs-on: ubuntu-latest
continue-on-error: true
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
output/

# bellow is merge of vscode and node git ignores

.vscode/*
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: trailing-whitespace
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"bashIde.explainshellEndpoint": "http://localhost:5000",
"diffEditor.ignoreTrimWhitespace": false
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 devcontainers-contrib
Copyright (c) 2024 devcontainers-extra

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
31 changes: 11 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
# Devcontainer Features

![Codespaces](https://img.shields.io/static/v1?style=for-the-badge&message=Codespaces&color=181717&logo=GitHub&logoColor=FFFFFF&label=)
![Devcontainers](https://img.shields.io/static/v1?style=for-the-badge&message=Devcontainers&color=2496ED&logo=Docker&logoColor=FFFFFF&label=)
![Python](https://img.shields.io/static/v1?style=for-the-badge&message=Python&color=3776AB&logo=Python&logoColor=FFFFFF&label=)
# Extra Dev Container Features

🐳 Extra add-in features for
[devcontainers](https://code.visualstudio.com/docs/devcontainers/containers) and
[GitHub Codespaces](https://github.com/features/codespaces)

<div align="center">

![](https://i.imgur.com/VgiY81S.png)
👀 Don't see your feature here? [🔥 Suggest a new feature! 🔥](https://github.com/devcontainers-extra/features/issues/new?template=suggest-feature.yaml) \
🔍 Found a bug? [🐞 Open a bug report! 🐞](https://github.com/devcontainers-extra/features/issues/new?template=feature-bug-report.yaml)

</div>
## About This Fork

💻 Works with devcontainers \
☁️ Works with GitHub Codespaces \
👀 Don't see your feature here? [🔥Suggest a new feature!🔥](https://github.com/devcontainers-contrib/features/issues/new?template=suggest-feature.yaml)
This repository is a continuation of the [devcontainers-contrib/features](https://github.com/devcontainers-contrib/features) project, initially developed by [danielbraun89](https://github.com/danielbraun89). The fork was created to maintain and enhance the project due to inactivity in the original repository.

> [!NOTE]
> This project is not officially associated with or endorsed by the official [Devcontainers](https://containers.dev/) project

## Usage

Expand All @@ -29,24 +24,20 @@ of an `options` object.

```json
{
"image": "mcr.microsoft.com/devcontainers/universal",
"image": "mcr.microsoft.com/devcontainers/base:bookworm",
"features": {
"ghcr.io/devcontainers-contrib/features/deno": {},
"ghcr.io/devcontainers-contrib/features/neovim": {}
"ghcr.io/devcontainers-extra/features/deno": {},
"ghcr.io/devcontainers-extra/features/neovim": {}
}
}
```

Then, after adding your devcontainer config file, you can open it in GitHub
Codespaces, or [open it locally using VS Code]. Be warned some features will
Codespaces, or \[open it locally using VS Code\]. Be warned some features will
compile things from source code and may take a while!

<div align="center">

![](https://i.imgur.com/JMdowst.png)

</div>

### Found a bug?

[🐞Open an bug report!🐞](https://github.com/devcontainers-contrib/features/issues/new?template=feature-bug-report.yaml)
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

The runner is the application that runs a job from a GitHub Actions workflow. It is used by GitHub Actions in the hosted virtual environments, or you can self-host the runner in your own environment.

## Example DevContainer Usage
## Example Usage

```json
"features": {
"ghcr.io/devcontainers-contrib/features/actions-runner-noexternals:1": {}
"ghcr.io/devcontainers-extra/features/actions-runner-noexternals:1": {}
}
```

Expand All @@ -19,3 +19,7 @@ The runner is the application that runs a job from a GitHub Actions workflow. It
| dotnetVersion | Select the dotnet version to install. | string | latest |



---

_Note: This file was auto-generated from the [devcontainer-feature.json](devcontainer-feature.json). Add additional notes to a `NOTES.md`._
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -e

# nanolayer is a cli utility which keeps container layers as small as possible
# source code: https://github.com/devcontainers-contrib/nanolayer
# `ensure_nanolayer` is a bash function that will find any existing nanolayer installations,
# and if missing - will download a temporary copy that automatically get deleted at the end
# `ensure_nanolayer` is a bash function that will find any existing nanolayer installations,
# and if missing - will download a temporary copy that automatically get deleted at the end
# of the script
ensure_nanolayer nanolayer_location "v0.5.4"

Expand All @@ -16,15 +16,15 @@ $nanolayer_location \
devcontainer-feature \
"ghcr.io/devcontainers/features/dotnet:1.1.3" \
--option dotnetVersion="$DOTNETVERSION" --option runtimeOnly='true'



$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-contrib/features/gh-release:1.0.23" \
--option repo='actions/runner' --option binaryNames='run.sh' --option binLocation='$_REMOTE_USER_HOME/.local/bin' --option version="$VERSION" --option libLocation='$_REMOTE_USER_HOME' --option libName='actions-runner' --option assetRegex='^(?!.*(noruntime))(?!.*(trimmedpackages))(.*-noexternals.*)'



$nanolayer_location \
Expand All @@ -33,7 +33,7 @@ $nanolayer_location \
"ghcr.io/devcontainers-contrib/features/bash-command:1.0.0" \
--option command='rm /home/vscode/.local/bin/run.sh && \
chown -hR ${_REMOTE_USER}:${_REMOTE_USER} $_REMOTE_USER_HOME/actions-runner'



echo "GitHub Actions Runner now installed at $_REMOTE_USER_HOME/actions-runner"
Expand Down
Loading