-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PC-31321)[API] ci: use teleport and argocd actions
- Loading branch information
1 parent
8dab91c
commit 5b2cc5a
Showing
4 changed files
with
15 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,6 @@ on: | |
app_version: | ||
type: string | ||
required: true | ||
teleport_version: | ||
type: string | ||
required: true | ||
teleport_proxy: | ||
type: string | ||
required: true | ||
|
@@ -63,21 +60,15 @@ jobs: | |
with: | ||
secrets: |- | ||
API_TOKEN_GITHUB:passculture-metier-ehp/passculture-main-sa-access-token | ||
- name: "Install Teleport" | ||
uses: teleport-actions/setup@v1 | ||
with: | ||
version: ${{ inputs.teleport_version }} | ||
- name: "Teleport Authentication" | ||
uses: teleport-actions/auth-k8s@v1 | ||
id: "teleport-auth" | ||
- name: "Connect to cluster" | ||
uses: pass-culture/common-workflows/actions/teleport-connect@teleport-connect/v0.1.0 | ||
with: | ||
proxy: ${{ inputs.teleport_proxy }} | ||
token: github-token | ||
certificate-ttl: 1h | ||
kubernetes-cluster: ${{ inputs.teleport_kubernetes_cluster }} | ||
teleport_proxy: ${{ inputs.teleport_proxy }} | ||
teleport_kubernetes_cluster: ${{ inputs.teleport_kubernetes_cluster }} | ||
|
||
- name: "Play pre-migrations" | ||
uses: pass-culture/common-workflows/actions/pcapi-migration@PC-31321-pcapi-migration-action | ||
uses: pass-culture/common-workflows/actions/pcapi-migration@pcapi-migration/v0.1.0 | ||
with: | ||
environment: ${{ inputs.environment }} | ||
app_version: ${{ inputs.app_version }} | ||
|
@@ -126,20 +117,12 @@ jobs: | |
api_token_github_secret_name: passculture-metier-ehp/passculture-main-sa-access-token | ||
chart_values_repository: "" | ||
helmfile_path: "./pass-culture-deployment/helm/pcapi" | ||
- name: "Install argocd cli" | ||
id: install_argocd_cli | ||
run: | | ||
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 | ||
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd | ||
rm argocd-linux-amd64 | ||
- name: "Check argocd application status" | ||
id: check_status | ||
run: | | ||
kubectl config set-context --current --namespace=argocd | ||
argocd app sync pcapi-${{ inputs.environment }} --core --async --prune | ||
argocd app wait pcapi-${{ inputs.environment }} --core --timeout 600 | ||
- name: "Sync ArgoCD application" | ||
uses: pass-culture/common-workflows/actions/argocd-sync@argocd-sync/v0.2.0 | ||
with: | ||
app_name: pcapi-${{ inputs.environment }} | ||
- name: "Play post-migrations" | ||
uses: pass-culture/common-workflows/actions/pcapi-migration@PC-31321-pcapi-migration-action | ||
uses: pass-culture/common-workflows/actions/pcapi-migration@v0.1.0 | ||
with: | ||
environment: ${{ inputs.environment }} | ||
app_version: ${{ inputs.app_version }} | ||
|
@@ -244,18 +227,11 @@ jobs: | |
contents: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Install Teleport" | ||
uses: teleport-actions/setup@v1 | ||
with: | ||
version: ${{ inputs.teleport_version }} | ||
- name: "Teleport Authentication" | ||
id: "teleport-auth" | ||
uses: teleport-actions/auth-k8s@v1 | ||
- name: "Connect to cluster" | ||
uses: pass-culture/common-workflows/actions/[email protected] | ||
with: | ||
proxy: ${{ inputs.teleport_proxy }} | ||
token: github-token | ||
certificate-ttl: 1h | ||
kubernetes-cluster: ${{ inputs.teleport_kubernetes_cluster }} | ||
teleport_proxy: ${{ inputs.teleport_proxy }} | ||
teleport_kubernetes_cluster: ${{ inputs.teleport_kubernetes_cluster }} | ||
- name: "Configure algolia" | ||
id: "set_algolia_settings" | ||
uses: nick-fields/retry@v3 | ||
|