-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Implemented running integration tests in CI
- Loading branch information
Showing
41 changed files
with
2,709 additions
and
292 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
# check this website for detailed configuration options: | ||
# https://ansible-lint.readthedocs.io/configuring/#ansible-lint-configuration | ||
|
||
profile: shared | ||
|
||
exclude_paths: | ||
- .github | ||
- .git | ||
- "*/docker-compose.yaml" |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
root = true | ||
|
||
[*] | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: 'Configure CLI tools for CI/CD' | ||
description: 'Setup CI/CD tools and authentication' | ||
inputs: | ||
google_workload_identity_provider: | ||
required: true | ||
description: "Google workload identity provider, created in `deploy/setup.sh`." | ||
google_service_account: | ||
required: true | ||
description: "Google service account email, created in `deploy/setup.sh`." | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: google-github-actions/auth@v1 | ||
with: | ||
workload_identity_provider: ${{ inputs.google_workload_identity_provider }} | ||
service_account: ${{ inputs.google_service_account }} | ||
- uses: google-github-actions/setup-gcloud@v1 | ||
- uses: giantswarm/install-binary-action@v1 | ||
with: | ||
binary: 'atlas' | ||
version: '1.4.0' | ||
smoke_test: "${binary} --version" | ||
tarball_binary_path: "*/bin/${binary}" | ||
download_url: 'https://fastdl.mongodb.org/mongocli/mongodb-atlas-cli_${version}_linux_x86_64.tar.gz' |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 'Configure Docker tools' | ||
description: 'Setup Docker tools and authentication' | ||
inputs: | ||
google_workload_identity_provider: | ||
required: true | ||
description: "Google workload identity provider, created in `deploy/setup.sh`." | ||
google_service_account: | ||
required: true | ||
description: "Google service account email, created in `deploy/setup.sh`." | ||
container_registry: | ||
required: true | ||
description: "Container registry to login to" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: google-github-actions/auth@v1 | ||
id: google_auth | ||
with: | ||
token_format: 'access_token' | ||
workload_identity_provider: ${{ inputs.google_workload_identity_provider }} | ||
service_account: ${{ inputs.google_service_account }} | ||
access_token_lifetime: 300s | ||
- uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ inputs.container_registry }} | ||
username: oauth2accesstoken | ||
password: ${{ steps.google_auth.outputs.access_token }} | ||
- uses: docker/setup-buildx-action@v2 |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Cleanup | ||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
required: true | ||
type: string | ||
|
||
secrets: | ||
GOOGLE_WORKLOAD_IDENTITY_PROVIDER: | ||
required: true | ||
GOOGLE_SERVICE_ACCOUNT_EMAIL: | ||
required: true | ||
GOOGLE_PROJECT_ID: | ||
required: true | ||
GOOGLE_REGION: | ||
required: true | ||
SENTRY_DSN: | ||
required: true | ||
CLOUDFLARE_API_TOKEN: | ||
required: true | ||
CLOUDFLARE_ACCOUNT_ID: | ||
required: true | ||
MONGODB_ATLAS_PUBLIC_KEY: | ||
required: true | ||
MONGODB_ATLAS_PRIVATE_KEY: | ||
required: true | ||
MONGODB_ATLAS_PROJECT_ID: | ||
required: true | ||
|
||
jobs: | ||
delete_containers: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/config_docker | ||
with: | ||
google_workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }} | ||
google_service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }} | ||
container_registry: ${{ secrets.GOOGLE_REGION }}-docker.pkg.dev | ||
- uses: 'docker://europe-docker.pkg.dev/gcr-cleaner/gcr-cleaner/gcr-cleaner-cli' | ||
with: | ||
args: >- | ||
-repo=${{ secrets.GOOGLE_REGION }}-docker.pkg.dev/${{ secrets.GOOGLE_PROJECT_ID }}/docker/${{ inputs.environment }} | ||
-recursive=true | ||
delete_resources: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/config_cli_tools | ||
with: | ||
google_workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }} | ||
google_service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }} | ||
- run: ./deploy/run-ansible.sh src/delete.yml | ||
env: | ||
APP_TAG: ${{ inputs.tag }} | ||
APP_ENVIRONMENT: ${{ inputs.environment }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | ||
GOOGLE_REGION: ${{ secrets.GOOGLE_REGION }} | ||
GOOGLE_PROJECT_ID: ${{ secrets.GOOGLE_PROJECT_ID }} | ||
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY }} | ||
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY }} | ||
MONGODB_ATLAS_PROJECT_ID: ${{ secrets.MONGODB_ATLAS_PROJECT_ID }} | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |
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
Oops, something went wrong.