Skip to content

Commit

Permalink
ci: debug configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
flemzord committed Dec 19, 2023
1 parent 494a5b3 commit 41cd9de
Showing 1 changed file with 129 additions and 129 deletions.
258 changes: 129 additions & 129 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,120 +12,120 @@ concurrency:
cancel-in-progress: true

jobs:
# Dirty:
# runs-on: "formance-runner"
# steps:
# - uses: 'actions/checkout@v4'
# with:
# fetch-depth: 0
# - name: Setup Env
# uses: ./.github/actions/env
# - run: >
# earthly
# --allow-privileged
# --secret SPEAKEASY_API_KEY=$SPEAKEASY_API_KEY
# --secret GITHUB_TOKEN=$GITHUB_TOKEN
# ${{ contains(github.event.pull_request.labels.*.name, 'no-cache') && '--no-cache' || '' }}
# +pre-commit
# env:
# GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
# SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
# - name: Get changed files
# id: changed-files
# uses: tj-actions/changed-files@v40
# with:
# since_last_remote_commit: true
# - name: Run step if test file(s) change
# if: steps.changed-files.outputs.all_changed_files == 'true'
# run: |
# echo "One or more test file(s) has changed."
# echo "List all the files that have changed: ${{ steps.changed-files.outputs.all_changed_files }}"
# exit 1
#
# Main:
# runs-on: "formance-runner"
# needs:
# - Dirty
# steps:
# - uses: 'actions/checkout@v4'
# with:
# fetch-depth: 0
# - name: Setup Env
# uses: ./.github/actions/env
# - run: >
# earthly
# --no-output
# --allow-privileged
# --secret SPEAKEASY_API_KEY=$SPEAKEASY_API_KEY
# --secret SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY
# --secret GITHUB_TOKEN=$GITHUB_TOKEN
# --secret FURY_TOKEN=$FURY_TOKEN
# --secret GORELEASER_KEY=$GORELEASER_KEY
# ${{ contains(github.event.pull_request.labels.*.name, 'no-cache') && '--no-cache' || '' }}
# +pr
# env:
# GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
# SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
# FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
#
# Extract:
# name: Extract
# runs-on: "ubuntu-latest"
# outputs:
# components: ${{ steps.extract.outputs.components }}
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: actions/setup-node@v4
# with:
# node-version: 18
# - name: Extract service name
# id: extract
# run: echo "components=$(node .github/actions/find-directory/index.js)" >> $GITHUB_OUTPUT
#
# GoReleaser:
# runs-on: "ubuntu-latest"
# if: contains(github.event.pull_request.labels.*.name, 'build-images') || github.ref == 'refs/heads/main'
# needs:
# - Extract
# strategy:
# matrix:
# components: ${{ fromJson(needs.Extract.outputs.components) }}
# steps:
# - uses: earthly/actions-setup@v1
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# version: "latest"
# - uses: 'actions/checkout@v4'
# with:
# fetch-depth: 0
# - name: Setup Env
# uses: ./.github/actions/env
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: "NumaryBot"
# password: ${{ secrets.NUMARY_GITHUB_TOKEN }}
# - run: >
# earthly
# --no-output
# --allow-privileged
# --secret SPEAKEASY_API_KEY=$SPEAKEASY_API_KEY
# --secret SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY
# --secret GITHUB_TOKEN=$GITHUB_TOKEN
# --secret FURY_TOKEN=$FURY_TOKEN
# --secret GORELEASER_KEY=$GORELEASER_KEY
# ${{ contains(github.event.pull_request.labels.*.name, 'no-cache') && '--no-cache' || '' }}
# +goreleaser --type=${{ matrix.components.type }} --components=${{ matrix.components.component }} --mode=ci
# env:
# GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
# SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
# FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
# SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY_OSS }}
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
Dirty:
runs-on: "formance-runner"
steps:
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- name: Setup Env
uses: ./.github/actions/env
- run: >
earthly
--allow-privileged
--secret SPEAKEASY_API_KEY=$SPEAKEASY_API_KEY
--secret GITHUB_TOKEN=$GITHUB_TOKEN
${{ contains(github.event.pull_request.labels.*.name, 'no-cache') && '--no-cache' || '' }}
+pre-commit
env:
GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
with:
since_last_remote_commit: true
- name: Run step if test file(s) change
if: steps.changed-files.outputs.all_changed_files == 'true'
run: |
echo "One or more test file(s) has changed."
echo "List all the files that have changed: ${{ steps.changed-files.outputs.all_changed_files }}"
exit 1
Main:
runs-on: "formance-runner"
needs:
- Dirty
steps:
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- name: Setup Env
uses: ./.github/actions/env
- run: >
earthly
--no-output
--allow-privileged
--secret SPEAKEASY_API_KEY=$SPEAKEASY_API_KEY
--secret SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY
--secret GITHUB_TOKEN=$GITHUB_TOKEN
--secret FURY_TOKEN=$FURY_TOKEN
--secret GORELEASER_KEY=$GORELEASER_KEY
${{ contains(github.event.pull_request.labels.*.name, 'no-cache') && '--no-cache' || '' }}
+pr
env:
GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
Extract:
name: Extract
runs-on: "ubuntu-latest"
outputs:
components: ${{ steps.extract.outputs.components }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Extract service name
id: extract
run: echo "components=$(node .github/actions/find-directory/index.js)" >> $GITHUB_OUTPUT

GoReleaser:
runs-on: "ubuntu-latest"
if: contains(github.event.pull_request.labels.*.name, 'build-images') || github.ref == 'refs/heads/main'
needs:
- Extract
strategy:
matrix:
components: ${{ fromJson(needs.Extract.outputs.components) }}
steps:
- uses: earthly/actions-setup@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: "latest"
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- name: Setup Env
uses: ./.github/actions/env
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: "NumaryBot"
password: ${{ secrets.NUMARY_GITHUB_TOKEN }}
- run: >
earthly
--no-output
--allow-privileged
--secret SPEAKEASY_API_KEY=$SPEAKEASY_API_KEY
--secret SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY
--secret GITHUB_TOKEN=$GITHUB_TOKEN
--secret FURY_TOKEN=$FURY_TOKEN
--secret GORELEASER_KEY=$GORELEASER_KEY
${{ contains(github.event.pull_request.labels.*.name, 'no-cache') && '--no-cache' || '' }}
+goreleaser --type=${{ matrix.components.type }} --components=${{ matrix.components.component }} --mode=ci
env:
GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY_OSS }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
Deploy:
runs-on: "ubuntu-latest"
Expand All @@ -135,9 +135,9 @@ jobs:
permissions:
id-token: write
contents: read
# needs:
# - GoReleaser
# - Main
needs:
- GoReleaser
- Main
steps:
- uses: earthly/actions-setup@v1
with:
Expand Down Expand Up @@ -166,15 +166,15 @@ jobs:
- name: Update kube config
run: aws eks update-kubeconfig --name staging-eu-west-1-hosting --region eu-west-1 --role-arn $(aws sts get-caller-identity | jq .Arn | sed 's|\(.*\)/.*|\1|')
- run: kubectl config use-context arn:aws:eks:eu-west-1:955332203423:cluster/staging-eu-west-1-hosting
- name: Deploy in staging
run: |
kubectl patch Versions default -p "{\"spec\":{\"ledger\": \"${GITHUB_SHA}\"}}" --type=merge
kubectl patch Versions default -p "{\"spec\":{\"payments\": \"${GITHUB_SHA}\"}}" --type=merge
kubectl patch Versions default -p "{\"spec\":{\"auth\": \"${GITHUB_SHA}\"}}" --type=merge
kubectl patch Versions default -p "{\"spec\":{\"gateway\": \"${GITHUB_SHA}\"}}" --type=merge
kubectl patch Versions default -p "{\"spec\":{\"orchestration\": \"${GITHUB_SHA}\"}}" --type=merge
kubectl patch Versions default -p "{\"spec\":{\"reconciliation\": \"${GITHUB_SHA}\"}}" --type=merge
kubectl patch Versions default -p "{\"spec\":{\"search\": \"${GITHUB_SHA}\"}}" --type=merge
kubectl patch Versions default -p "{\"spec\":{\"stargate\": \"${GITHUB_SHA}\"}}" --type=merge
kubectl patch Versions default -p "{\"spec\":{\"wallets\": \"${GITHUB_SHA}\"}}" --type=merge
kubectl patch Versions default -p "{\"spec\":{\"webhooks\": \"${GITHUB_SHA}\"}}" --type=merge
# - name: Deploy in staging
# run: |
# kubectl patch Versions default -p "{\"spec\":{\"ledger\": \"${GITHUB_SHA}\"}}" --type=merge
# kubectl patch Versions default -p "{\"spec\":{\"payments\": \"${GITHUB_SHA}\"}}" --type=merge
# kubectl patch Versions default -p "{\"spec\":{\"auth\": \"${GITHUB_SHA}\"}}" --type=merge
# kubectl patch Versions default -p "{\"spec\":{\"gateway\": \"${GITHUB_SHA}\"}}" --type=merge
# kubectl patch Versions default -p "{\"spec\":{\"orchestration\": \"${GITHUB_SHA}\"}}" --type=merge
# kubectl patch Versions default -p "{\"spec\":{\"reconciliation\": \"${GITHUB_SHA}\"}}" --type=merge
# kubectl patch Versions default -p "{\"spec\":{\"search\": \"${GITHUB_SHA}\"}}" --type=merge
# kubectl patch Versions default -p "{\"spec\":{\"stargate\": \"${GITHUB_SHA}\"}}" --type=merge
# kubectl patch Versions default -p "{\"spec\":{\"wallets\": \"${GITHUB_SHA}\"}}" --type=merge
# kubectl patch Versions default -p "{\"spec\":{\"webhooks\": \"${GITHUB_SHA}\"}}" --type=merge

0 comments on commit 41cd9de

Please sign in to comment.