Skip to content

Commit

Permalink
fix(Earthfile): update earthly version and correct deploy-staging com…
Browse files Browse the repository at this point in the history
…mand

- Update earthly version from v0.16.0 to v0.16.1
- Correct deploy-staging command in Earthfile

ci(releases.yml): remove earthly setup and add OpenAPI file to release

- Remove earthly/actions-setup@v1 from the workflow
- Add step to upload OpenAPI file to release assets

ci(main.yml): simplify staging deployment steps

- Consolidate staging deployment steps into a single step
- Use deploy-staging target for deployment in staging
  • Loading branch information
flemzord committed Sep 25, 2024
1 parent 78ab2d2 commit e772a5b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 34 deletions.
28 changes: 3 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,33 +135,11 @@ jobs:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
- name: "staging-regions: Sset Operator, Agent, Modules tags"
- name: "Deploy in staging"
env:
# Only Region deployment need the token in order to deploy with argocd
ARGOCD_REGION_AUTH_TOKEN: ${{ secrets.ARGOCD_REGION_AUTH_TOKEN }}
# Only for module
STAGING_CLUSTER_KUBECONTEXT_NAME: ${{ secrets.STAGING_CLUSTER_KUBECONTEXT_NAME }}
STAGING_CLUSTER_NAME: ${{ secrets.STAGING_CLUSTER_NAME }}
STAGING_CLUSTER_REGION: ${{ secrets.STAGING_CLUSTER_REGION }}
TAG: ${{ github.sha }}
run: >
earthly
--no-output
--secret AUTH_TOKEN=$ARGOCD_REGION_AUTH_TOKEN
+staging-application-set
--TAG=$TAG
- name: "staging-regions: Sync"
env:
# Only Region deployment need the token in order to deploy with argocd
ARGOCD_REGION_AUTH_TOKEN: ${{ secrets.ARGOCD_REGION_AUTH_TOKEN }}
STAGING_CLUSTER_KUBECONTEXT_NAME: ${{ secrets.STAGING_CLUSTER_KUBECONTEXT_NAME }}
STAGING_CLUSTER_NAME: ${{ secrets.STAGING_CLUSTER_NAME }}
STAGING_CLUSTER_REGION: ${{ secrets.STAGING_CLUSTER_REGION }}
TAG: ${{ github.sha }}
run: >
earthly
--no-output
--secret AUTH_TOKEN=$ARGOCD_REGION_AUTH_TOKEN
+staging-application-sync
--TAG=$TAG
+deploy-staging
--TAG=$TAG
11 changes: 6 additions & 5 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ jobs:
GoReleaser:
runs-on: "ubuntu-latest"
steps:
- uses: earthly/actions-setup@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: "latest"
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
Expand Down Expand Up @@ -41,4 +37,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
- name: Add the OpenAPI file to the release assets
run: >
gh release upload ${{github.ref_name}} ./openapi.yaml#openapi.yaml
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 2 additions & 4 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
VERSION 0.8

IMPORT github.com/formancehq/earthly:tags/v0.16.0 AS core


IMPORT github.com/formancehq/earthly:tags/v0.16.1 AS core

FROM core+base-image

Expand Down Expand Up @@ -47,7 +45,7 @@ deploy:
RUN kubectl patch Versions.formance.com default -p "{\"spec\":{\"webhooks\": \"${tag}\"}}" --type=merge

deploy-staging:
BUILD --pass-args core+deployer-module --MODULE=webhooks
BUILD --pass-args core+deploy-staging

lint:
FROM core+builder-image
Expand Down

0 comments on commit e772a5b

Please sign in to comment.