Azure / apiops

APIOps applies the concepts of GitOps and DevOps to API deployment. By using practices from these two methodologies, APIOps can enable everyone involved in the lifecycle of API design, development, and deployment with self-service and automated tools to ensure the quality of the specifications and APIs that they’re building.
https://azure.github.io/apiops
MIT License
328 stars 193 forks source link

[Question] Does the Publisher pipeline re-deploy extracted APIs from Dev Environment while deploying to prod using run-publisher.yaml #682

Closed fastech2020 closed 1 month ago

fastech2020 commented 1 month ago

Release version

apiops_release_version: v6.0.1.1

Question Details

Hi,

I have extracted all existing APIs using extractor pipeline and wanted to verify whether the publisher pipeline re-deploy extracted APIs to Dev environment while running the publisher pipeline to deploy it to

Expected behavior

I have downloaded the source folder for GitHub action and setup the Extractor and Publisher pipeline.

I was able to extract all existing APIs from dev environments using extractor pipeline and the plan is to deploy extracted APIs (artifacts) to prod environment with updated config.

However, I noticed the run-publisher.yaml file (publisher pipeline) has following code block (line 32-50) , does that mean it will re-deploy all the extracted APIs (artifacts) to dev environment even though there are no changes in artifact? I just wanted to verify before I run the publisher pipeline.

Push-Changes-To-APIM-Dev-With-Commit-ID:
    if: (github.event.inputs.COMMIT_ID_CHOICE == 'publish-artifacts-in-last-commit' || github.event.inputs.COMMIT_ID_CHOICE == '')
    needs: get-commit
    uses: ./.github/workflows/run-publisher-with-env.yaml
    with:
      API_MANAGEMENT_ENVIRONMENT: dev # change this to match the dev environment created in settings
      COMMIT_ID: ${{ needs.get-commit.outputs.commit_id }}
      API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH: apimartifacts # change this to the artifacts folder
    secrets: inherit

Actual behavior

N/A

Reproduction Steps

N/A

github-actions[bot] commented 1 month ago
  Thank you for opening this issue! Please be patient while we will look into it and get back to you as this is an open source project. In the meantime make sure you take a look at the [closed issues](https://github.com/Azure/apiops/issues?q=is%3Aissue+is%3Aclosed) in case your question has already been answered. Don't forget to provide any additional information if needed (e.g. scrubbed logs, detailed feature requests,etc.).
  Whenever it's feasible, please don't hesitate to send a Pull Request (PR) our way. We'd greatly appreciate it, and we'll gladly assess and incorporate your changes.
guythetechie commented 1 month ago

Correct, our starter pipelines will redeploy to dev first. It's meant to be a sanity check: make sure the dev redeployment works before moving on to higher environments.

Feel free to change the pipelines if you don't want that behavior.