Skip to content

Instantly share code, notes, and snippets.

View Jasstkn's full-sized avatar
🐒
chaos monkey

Maria Kotliarevskaia Jasstkn

🐒
chaos monkey
View GitHub Profile
@Jasstkn
Jasstkn / k6_smoke_tests.js
Created September 23, 2022 12:53
run smoke tests via k6
import { check } from 'k6';
import http from 'k6/http';
import { sleep } from 'k6';
export default function() {
const mainPage = http.get('https://example.com');
sleep(1);
check (mainPage, {
'main: is status 200': (r) => r.status === 200,
});
scan_image:
stage: scan
image:
name: docker.io/aquasec/trivy:latest
entrypoint: [""]
tags:
- docker
needs:
- dockerfile_lint
- build
- name: Scan repo with kube-linter
uses: stackrox/kube-linter-action@v1.0.4
with:
directory: .helmwave
config: .kube-linter/config.yaml
- name: Kubeval
uses: instrumenta/kubeval-action@master
with:
files: .helmwave/manifest/
- name: Download Pluto
- name: Set environment for branch
run: |
if [[ $GITHUB_REF == 'refs/heads/master' ]]; then
echo "CI_ENVIRONMENT_NAME=prod" >> "$GITHUB_ENV"
else
echo "CI_ENVIRONMENT_NAME=stage" >> "$GITHUB_ENV"
fi
version: 0.18.0
.options: &options
namespace: microservices-demo
wait: true
timeout: 300s
create_namespace: true
releases:
releases:
- name: adservice
- name: cartservice
- name: checkoutservice
- name: currencyservice
- name: emailservice
- name: frontend
- name: paymentservice
- name: productcatalogservice
- name: recommendationservice
version: 0.18.0
.options: &options
namespace: microservices-demo
wait: true
timeout: 300s
create_namespace: true
releases:
{{- with readFile "releases.yaml" | fromYaml | get "releases" }}
@Jasstkn
Jasstkn / molecule-test.yml
Created March 10, 2021 08:43
molecule-test.yml
molecule-test:
name: molecule test
runs-on: ubuntu-latest
strategy:
matrix:
distro:
- ubuntu2004
- ubuntu1804
scenario:
- oh-my-zsh
@Jasstkn
Jasstkn / lint.yml
Created March 10, 2021 08:41
GA job for lint
jobs:
lint:
name: molecule lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
...
- name: Molecule test
run: |
@Jasstkn
Jasstkn / test_role.py
Created March 10, 2021 07:45
test_role.py
import pytest
@pytest.mark.parametrize('username', [
'test_usr1',
'test_usr2',
'test_usr5',
])
def test_oh_my_zsh_install(host, username):
oh_my_zsh = host.file('/home/' + username + '/.oh-my-zsh')