port most recent changes from KAH (#478)

* port most recent changes from KAH

* add general shizzle

* add rests of go tests

* whoops

* hmm

* make pre-release wait more

* try another synthaxis

* okey...

* test-> tests

* Make unittests a bit more usefull
This commit is contained in:
Kjeld Schouten-Lebbing
2021-05-19 20:51:35 +02:00
committed by GitHub
parent fd43d79929
commit d3033f71fb
59 changed files with 2792 additions and 3956 deletions
+23 -13
View File
@@ -1,26 +1,36 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.154.0/containers/ruby/.devcontainer/base.Dockerfile
# [Choice] Ruby version: 2, 2.7, 2.6, 2.5
ARG VARIANT="2"
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
ARG VARIANT="1.16"
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
ARG HELM_VERSION="3.5.4"
ARG CT_VERSION=3.3.1
ENV DEBIAN_FRONTEND=noninteractive
COPY Gemfile /tmp/Gemfile
RUN \
apt-get update \
&& \
apt-get -y install --no-install-recommends \
jq \
libjq-dev \
libonig-dev \
gnupg2 \
python3-pip \
python3-setuptools \
&& \
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin \
&& \
curl -fsSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | /bin/bash - \
curl -o /tmp/helm.tar.gz "https://get.helm.sh/helm-v${HELM_VERSION}-linux-$(dpkg --print-architecture).tar.gz" \
&& tar xvzf /tmp/helm.tar.gz -C /usr/local/bin --strip-components 1 "linux-$(dpkg --print-architecture)/helm" \
&& chmod +x /usr/local/bin/helm \
&& \
bundle config set system 'true' \
&& bundle install --gemfile /tmp/Gemfile \
&& rm /tmp/Gemfile
curl -o /tmp/ct.tar.gz -L "https://github.com/helm/chart-testing/releases/download/v${CT_VERSION}/chart-testing_${CT_VERSION}_linux_$(dpkg --print-architecture).tar.gz" \
&& mkdir -p /etc/ct \
&& tar xvzf /tmp/ct.tar.gz -C /usr/local/bin "ct" \
&& tar xvzf /tmp/ct.tar.gz --strip-components=1 -C /etc/ct "etc/" \
&& chmod +x /usr/local/bin/ct \
&& \
pip3 install \
pre-commit \
yamale \
yamllint \
&& \
rm \
/tmp/helm.tar.gz \
/tmp/ct.tar.gz
+23 -24
View File
@@ -1,33 +1,32 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.154.0/containers/ruby
{
"name": "Ruby",
"build": {
"context": "..",
"dockerfile": "Dockerfile",
"args": {
// Update 'VARIANT' to pick a Ruby version: 2, 2.7, 2.6, 2.5
"VARIANT": "2.7",
}
},
"name": "Go",
"build": {
"context": "..",
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "1.16",
}
},
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-kubernetes-tools.vscode-kubernetes-tools",
"rebornix.Ruby"
],
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-kubernetes-tools.vscode-kubernetes-tools",
"golang.go"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "export RUBYJQ_USE_SYSTEM_LIBRARIES=1 && bundle install",
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "export RUBYJQ_USE_SYSTEM_LIBRARIES=1 && bundle install",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}