Skip to content

Instantly share code, notes, and snippets.

Document Path: /fruits
Document Length: 73 bytes
Concurrency Level: 100
Time taken for tests: 34.729 seconds
Complete requests: 9812
Failed requests: 0
Total transferred: 1923152 bytes
HTML transferred: 716276 bytes
Requests per second: 282.53 [#/sec] (mean)
# Generate a badge
# run your tests... get the $total of covared lines and calculate the COLOR of youe badge
# for example if (( $total < 50 )) ;then COLOR=RED ;done
curl "https://img.shields.io/badge/coavrege-$total%25-$COLOR" > badge.svg
gsutil -h "Cache-Control: no-cache" cp badge.svg gs://$SOME_BACKET/$PROJECT_NAME/codcov.svg
gsutil acl ch -u AllUsers:R gs://$SOME_BACKET/$PROJECT_NAME/codcov.svg
#REPLACE $SOME_BUCKET and $PROJECT_NAME
name: CodeCov
on:
push:
branches: [ master ]
jobs:
cd:
name: CodeCov
runs-on: ubuntu-latest
name: Go CI
on:
pull_request:
branches: [ master ]
jobs:
ci:
name: CI
runs-on: ubuntu-latest
docker run -v ~/.kube:/home/argocd/.kube --rm argoproj/argocd:latest argocd-util -n argocd export > backup.yaml
docker run -v ~/.kube:/home/argocd/.kube \
--rm argoproj/argocd:latest \
argocd-util -n argocd export > backup.yaml
FROM argoproj/argocd:latest
WORKDIR /app
COPY do-backup.bash /app/app
USER root
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt install python curl bash -y
RUN curl -sSL "https://sdk.cloud.google.com" | bash
ENV PATH $PATH:/root/google-cloud-sdk/bin
CMD ["/app/app"]
#!/usr/bin/env bash
set -x
argocd-util -n argocd export > backup.yaml
gsutil cp backup.yaml "gs://rgocd-backup/backup-$(date +%y-%m-%d).yaml"
#!/bin/zsh
gsutil mb gs://argocd-backup
gcloud iam service-accounts create argocd-backup \
--description="argocd-backup utils" \
--display-name="argocd-backup"
gsutil iam ch serviceAccount:argocd-backup@<PROJECT_KEY>.iam.gserviceaccount.com:objectAdmin gs://argocd-backup