forked from VirtusLab/jenkins-operator
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): update devcontainers, github actions config, bats action (#928)
- Loading branch information
1 parent
3682468
commit 138e569
Showing
5 changed files
with
75 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,56 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/kubernetes-helm-minikube | ||
// For format details, see https://aka.ms/devcontainer.json | ||
{ | ||
"name": "Kubernetes - Minikube-in-Docker", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"image": "mcr.microsoft.com/devcontainers/base:bookworm", | ||
"name": "Jenkins kubernetes operator devcontainer", | ||
"image": "mcr.microsoft.com/devcontainers/base:bookworm", | ||
|
||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": { | ||
"enableNonRootDocker": "true", | ||
"moby": "true" | ||
}, | ||
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": { | ||
"version": "latest", | ||
"helm": "latest", | ||
"minikube": "latest" | ||
}, | ||
"ghcr.io/devcontainers/features/go:1": { | ||
"version": "1.15", | ||
"golangciLintVersion": "1.26.0" | ||
}, | ||
"ghcr.io/mpriscella/features/kind:1": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/edouard-lopez/devcontainer-features/bats:0": { | ||
"version": "latest" | ||
} | ||
} | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": { | ||
"enableNonRootDocker": "true", | ||
"moby": "true" | ||
}, | ||
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": { | ||
"version": "latest", | ||
"helm": "latest", | ||
"minikube": "none" | ||
}, | ||
"ghcr.io/devcontainers/features/go:1": { | ||
"version": "1.15", | ||
"golangciLintVersion": "1.26.0" | ||
}, | ||
"ghcr.io/mpriscella/features/kind:1": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/edouard-lopez/devcontainer-features/bats:0": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/brokenpip3/devcontainers-bats/bats-libs:0": { | ||
} | ||
}, | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "kubectl version", | ||
"postCreateCommand": "go version", | ||
|
||
// Use 'postStartCommand' to run commands after the container is created like starting minikube. | ||
// "postStartCommand": "nohup bash -c 'minikube start &' > minikube.log 2>&1", | ||
// "postStartCommand": "nohup bash -c 'minikube start &' > minikube.log 2>&1", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
// Configure tool-specific properties. | ||
"customizations": { | ||
"codespaces": { | ||
"openFiles": [ | ||
"Makefile" | ||
] | ||
}, | ||
// install some vscode extensions | ||
"vscode": { | ||
"extensions": [ | ||
"golang.Go", | ||
"jetmartin.bats", | ||
"ms-kubernetes-tools.vscode-kubernetes-tools", | ||
"budparr.language-hugo-vscode", | ||
"GitHub.copilot", | ||
"GitHub.copilot-chat" | ||
] | ||
} | ||
}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,18 +44,20 @@ jobs: | |
- name: Ensure Golang runtime dependencies | ||
run: make go-dependencies | ||
|
||
- name: Setup BATS | ||
uses: mig4/setup-bats@v1 | ||
- name: Setup Bats and libs | ||
uses: brokenpip3/setup-bats[email protected] | ||
with: | ||
bats-version: 1.9.0 | ||
|
||
- name: Setup Bats libs | ||
uses: brokenpip3/setup-bats[email protected] | ||
support-path: "${{ github.workspace }}/.bats/bats-support" | ||
assert-path: "${{ github.workspace }}/.bats/bats-assert" | ||
detik-path: "${{ github.workspace }}/.bats/bats-detik" | ||
file-path: "${{ github.workspace }}/.bats/bats-file" | ||
|
||
- name: Kind setup | ||
uses: helm/[email protected] | ||
with: | ||
cluster_name: ${{env.KIND_CLUSTER_NAME}} | ||
|
||
- name: Jenkins Operator - bats tests | ||
env: | ||
BATS_LIB_PATH: "${{ github.workspace }}/.bats" | ||
run: make bats-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters