staging: adding semaphore changes for staging#395
Conversation
WalkthroughThe pull request updates deployment configurations in several Semaphore CI files. The machine type in both production and staging deployments has been upgraded from Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant CI as Semaphore CI
participant AS as Artifact Store
participant Dep as Deployer/Cloud
Dev->>CI: Push commit
CI->>CI: Run "Checkout and Create Artifact" job
CI->>CI: Execute npm install & build process
CI->>AS: Push sw_webpush.min.js artifact
CI-->>CI: Job completes (result = passed)
CI->>CI: Auto-promote to Staging (if passed)
CI->>Dep: Trigger staging deployment
Dep->>AS: Pull sw_webpush.js and sw_webpush.min.js artifacts
Dep->>Dep: Upload assets to S3 (using updated branch variable)
Dep->>Dep: Cleanup old clevertap and sw_webpush files
Dep->>Dep: Invalidate CloudFront cache for updated assets
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…ub.com/CleverTap/clevertap-web-sdk into task/SNE-48188-setup-semaphore-staging
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
.semaphore/staging-deploy.yml (4)
13-13: Remove trailing spaces on the artifact pull command for clevertap.min.js.
Trailing spaces have been detected at the end of this line. Removing them will help maintain consistent formatting throughout the YAML file.- - artifact pull workflow clevertap.min.js + - artifact pull workflow clevertap.min.js🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 13-13: trailing spaces
(trailing-spaces)
14-14: Remove trailing spaces on the artifact pull command for clevertap.js.
This line contains extraneous trailing whitespace. Please remove it to keep the YAML clean.- - artifact pull workflow clevertap.js + - artifact pull workflow clevertap.js🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 14-14: trailing spaces
(trailing-spaces)
32-32: Remove trailing spaces on the secret declaration.
Trailing spaces are present at the end of this line; please remove them to ensure consistency in formatting.- - name: ProductionAccountAwsCredentials + - name: ProductionAccountAwsCredentials🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 32-32: trailing spaces
(trailing-spaces)
36-36: Review the empty os_image value and missing newline.
Theos_imagefield is set to an empty string here. Please confirm if this is intentional (perhaps to allow default configuration on the upgraded machine) or if it should be omitted altogether. Additionally, YAML lint reported a missing newline at the end of the file; adding one ensures standards compliance.- os_image: '' \ No newline at end of file + os_image: ''🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.semaphore/staging-deploy.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.semaphore/staging-deploy.yml
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 14-14: trailing spaces
(trailing-spaces)
[error] 32-32: trailing spaces
(trailing-spaces)
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (3)
.semaphore/staging-deploy.yml (3)
16-17: Add artifact pull commands for service worker files.
New commands have been introduced to pull bothsw_webpush.jsandsw_webpush.min.js, which align with the PR requirement to include service worker assets in the staging deployment.
24-28: Update S3 upload commands with branch variable revision.
These commands now use${SEMAPHORE_GIT_WORKING_BRANCH}to reference the staging branch, ensuring that the deployed assets are correctly versioned. This change is consistent with the intended staging deployment improvements.
35-35: Upgrade machine type for the deployment agent.
The machine type has been updated tos1-ultron-c5-large, which should provide improved resources during deployment. This change aligns with the upgrade objectives mentioned in the PR objectives.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.semaphore/staging-deploy.yml (3)
13-14: Remove Trailing Whitespaces in Artifact Pull CommandsThe artifact pull commands for
clevertap.min.jsandclevertap.jscontain trailing spaces. Please remove the extra whitespace to ensure proper YAML formatting and avoid potential linting issues.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 14-14: trailing spaces
(trailing-spaces)
32-32: Remove Trailing Whitespace in Secret DeclarationThe secret declaration on this line contains trailing spaces. Please remove them to conform with YAML styling guidelines.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 32-32: trailing spaces
(trailing-spaces)
36-36: Add Trailing Newline at End of FileThe file is missing a trailing newline at the end. Please add a newline character at the end to adhere to common formatting conventions.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.semaphore/staging-deploy.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.semaphore/staging-deploy.yml
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 14-14: trailing spaces
(trailing-spaces)
[error] 32-32: trailing spaces
(trailing-spaces)
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (5)
.semaphore/staging-deploy.yml (5)
16-17: New Service Worker Artifact Pull Commands AddedThe new artifact pull commands for
sw_webpush.jsandsw_webpush.min.jshave been introduced. Confirm that these artifacts are reliably produced in upstream workflow steps.
24-28: Consistent Use of Branch Variable in S3 Upload CommandsThe S3 upload commands have been updated to use the
${SEMAPHORE_GIT_WORKING_BRANCH}variable consistently across all assets, including the new service worker files. This ensures alignment with the deployment strategy.
29-29: Cleanup Command Extended to New AssetsThe cleanup command now removes
sw_webpush.min.jsandsw_webpush.jsalong with the Clevertap assets. This update helps maintain a clean workspace after deployment.
30-30: CloudFront Invalidation Now Includes New Service Worker PathsThe CloudFront invalidation command has been modified to reference
${SEMAPHORE_GIT_WORKING_BRANCH}and includes paths for the new service worker files. This should ensure proper cache invalidation for all deployed assets.
35-36: Agent Machine Type Updated AppropriatelyThe agent machine type has been changed to
s1-ultron-c5-largeon line 35, which aligns with the staging deployment upgrade. The use of an empty string foros_imageon line 36 appears intentional; please verify that this meets your deployment environment’s requirements.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 36-36: no new line character at the end of file
(new-line-at-end-of-file)
SNE-48188
Changes
Describe the key changes in this PR with the Jira Issue reference
Changes to Public Facing API if any
Please list the impact on the public facing API if any
How Has This Been Tested?
Describe the testing approach and any relevant configurations (e.g., environment, platform)
Checklist
Summary by CodeRabbit
New Features
Chores