Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new refactor for the main CI/CD pipeline #139

Closed

Conversation

AaronSosaRamos
Copy link
Contributor

Description

This PR refactors the CI/CD pipeline by updating the main.yml file for GitHub Actions to resolve the authentication issue with the API key in the production environment. The motivation behind this change is to ensure smooth deployment workflows and eliminate authentication-related failures during production builds.

Related Issue

No issue is related with this PR.

Type of Change

  • Bug fix: A non-breaking change that fixes an issue.
  • New feature: A non-breaking change that adds functionality.
  • Breaking change: A change that causes existing functionality to not work as expected.
  • Documentation update: Changes or updates to documentation.
  • Code style update: Changes that do not affect the meaning of the code (e.g., formatting).
  • Refactoring: A code change that neither fixes a bug nor adds a feature.
  • Performance improvement: A change that improves performance.
  • Test enhancement: Adding or updating tests; no production code change.
  • Chore: Changes to the build process or auxiliary tools; no production code change.
  • Other: (please describe)

Proposed Solution

The solution involved:

  • Modifying the main.yml file in GitHub Actions to correctly handle environment secrets, specifically the API key.
  • Ensuring secure retrieval and usage of the API key in the deployment workflow.
  • Testing the pipeline changes to confirm successful authentication in production.

How to Test

  1. Trigger the GitHub Actions workflow manually or by pushing changes to the repository.
  2. Confirm the successful completion of the deployment step without authentication errors.
  3. Validate the production environment to ensure the deployed application is functioning correctly.

Unit Tests

No unit tests were directly added or modified since this is a CI/CD pipeline change. Testing was performed through workflow execution.

Documentation Updates

  • Yes
  • No

If yes, describe what documentation updates are needed and link to the relevant documentation.

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

Additional Information

This update resolves a critical issue affecting production deployments. The refactor ensures a smoother, more secure CI/CD process with properly handled secrets for authentication.

@AaronSosaRamos AaronSosaRamos added the CI/CD For the CI/CD pipeline label Dec 14, 2024
@AaronSosaRamos AaronSosaRamos self-assigned this Dec 14, 2024
@AaronSosaRamos AaronSosaRamos changed the base branch from main to Develop December 17, 2024 16:36
# client = secretmanager.SecretManagerServiceClient(credentials=credentials)
# name = f"projects/{project_id}/secrets/{secret_id}/versions/{version_id}"
# response = client.access_secret_version(name=name)
# return response.payload.data.decode("UTF-8")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this deadcode please.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@AaronSosaRamos AaronSosaRamos added the maintainers only Issues that are assigned to Maintainers. label Dec 27, 2024
@stevenrayhinojosa-gmail-com

@yunusj should i close this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD For the CI/CD pipeline maintainers only Issues that are assigned to Maintainers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants