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

feature/update cicd pipeline stack base class #14

Merged
merged 6 commits into from
Jul 12, 2024

Conversation

rpmcginty
Copy link
Collaborator

@rpmcginty rpmcginty commented Jul 11, 2024

  • wip - updating pipeline stack base class
  • create base enum for cdk stack target + utils

What's in this Change?

improving base pipeline stack

  • adding pipeline_stage decorator and more fleshed out functionality in base stack
    • previously it did not do any of the building of the pipeline itself. now it manages that so long as the subclass initializes pipeline and adds stages.
  • creating a base enum class for stack targets (with methods to load from env / context node)
  • improving utils for project config objects.

Testing

  • deploying merscope pipeline

Comment on lines 360 to 364
# Steps:
# 1. Read the release script file
# 2. Base64 encode the file
# 3. Decode the base64 encoded file and write it to the release script path
f"echo {base64.b64encode((Path(__file__).parent / 'scripts' / 'cicd-release.sh').read_text().encode()).decode()} | base64 --decode > $RELEASE_SCRIPT_PATH"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are there any size limitations for this method?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't know unfortunately. I am trying to test these two options out to see what is best. I would assume for our script, it is small enough but I will know definitively soon.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will need to pick an option once my tests are complete.

@rpmcginty rpmcginty requested a review from sheriferson July 11, 2024 00:48
create_pull_request_step = pipelines.CodeBuildStep(
"CreateReleasePullRequest",
input=self.get_pipeline_source(pipeline_config.source),
# Environment needs to have privelaged access
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know this is old code, but might be good to go into more depth about what aspect of the build needs the privileged access and why it's needed rather than just stating it is necessary.

@rpmcginty rpmcginty force-pushed the feature/update-cicd-pipeline-stack-base-class branch 2 times, most recently from 47ac51f to 8c255fa Compare July 11, 2024 23:46
@rpmcginty rpmcginty force-pushed the feature/update-cicd-pipeline-stack-base-class branch from 8c255fa to 4da2eca Compare July 12, 2024 00:00
@njmei njmei self-requested a review July 12, 2024 16:59
@njmei njmei self-requested a review July 12, 2024 19:45
@rpmcginty rpmcginty merged commit a3ae555 into main Jul 12, 2024
4 checks passed
@rpmcginty rpmcginty deleted the feature/update-cicd-pipeline-stack-base-class branch July 12, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants