apps 를 등록 합니다.
kubectl apply -n argocd -f https://raw.githubusercontent.com/opspresso/argocd-env-demo/main/apps.yaml
export TG_USERNAME="nalbam"
export TG_PROJECT="sample-grpc"
export TG_VERSION="v0.0.0"
export TG_PHASE="demo"
export TG_TYPE="helm"
./build.sh
PAYLOAD="{\"event_type\":\"gitops\","
PAYLOAD="${PAYLOAD}\"client_payload\":{"
PAYLOAD="${PAYLOAD}\"username\":\"${TG_USERNAME}\","
PAYLOAD="${PAYLOAD}\"project\":\"${TG_PROJECT}\","
PAYLOAD="${PAYLOAD}\"version\":\"${TG_VERSION}\","
PAYLOAD="${PAYLOAD}\"phase\":\"${TG_PHASE}\","
PAYLOAD="${PAYLOAD}\"type\":\"${TG_TYPE}\""
PAYLOAD="${PAYLOAD}}}"
curl -sL -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-d "${PAYLOAD}" \
https://api.github.com/repos/opspresso/argocd-env-demo/dispatches
PAYLOAD="{\"parameters\":{"
PAYLOAD="${PAYLOAD}\"username\":\"${TG_USERNAME}\","
PAYLOAD="${PAYLOAD}\"project\":\"${TG_PROJECT}\","
PAYLOAD="${PAYLOAD}\"version\":\"${TG_VERSION}\","
PAYLOAD="${PAYLOAD}\"phase\":\"${TG_PHASE}\","
PAYLOAD="${PAYLOAD}\"type\":\"${TG_TYPE}\""
PAYLOAD="${PAYLOAD}}}"
curl -sL -X POST \
-u ${PERSONAL_TOKEN}: \
-H "Content-Type: application/json" \
-d "${PAYLOAD}" \
https://circleci.com/api/v2/project/gh/opspresso/argocd-env-demo/pipeline