Commit Graph

39 Commits

Author SHA1 Message Date
Goutham Pratapa
21962be8f7
chore: multi-arch dp image (#35098) 2024-07-22 23:10:47 +05:30
Goutham Pratapa
a5cb2fb642
feat: build multi arch images for dps (#34927)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
	- Updated Docker Hub credentials for improved security.
	- Enhanced Docker Buildx setup for cross-platform compatibility.
- Upgraded Docker build-push action to version 6 to leverage latest
features.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-15 12:56:18 +05:30
Shrikant Sharat Kandula
b2c850b2da
ci: Run prepare script for adaptable image, if available (#34906)
This is so DPs on `pg` branch continue to work.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Added a workflow step to check and execute server artifact preparation
script during the on-demand build process.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-13 12:42:53 +05:30
Shrikant Sharat Kandula
a8da148b41
ci: Add Postgres URL for DPs 2024-06-28 23:49:21 +05:30
Abhijeet
9d715748f5
chore: Update ci files for utilising base image on pg branch (#34190)
## Description
Temporary arrangement to consume different base image for `pg` vs
`release`, until we upgrade Postgres to v15 on release.

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9479342636>
> Commit: 69d29d1657d606d78c5f85aa130cf773eb693d27
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9479342636&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->











## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new input parameter `is-pg-build` to several workflows
for better customization of PostgreSQL builds.
- Enhanced Docker image build processes with dynamic base image tagging
based on pull request conditions.

- **Chores**
- Updated GitHub Actions workflows to improve build automation and
conditional logic handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-12 15:03:49 +05:30
Arpit Mohan
6aeb456c62
ci: Upgrade GitHub Action steps to github-script@v7 and pload-artifact@v4 (#33554)
## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No

---------

Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
2024-05-20 10:49:27 +05:30
Valera Melnikov
92c72ee20e
chore: update node version and appropriate git workflows (#31486)
## Description
- update node version and appropriate git workflow
- added the path to webpack cache folder, this should speed up bundle
creation about a minute

[Test, build and push Docker
Image](https://github.com/appsmithorg/appsmith/actions/runs/8421752151)
[Build Client, Server & Run only
Cypress](https://github.com/appsmithorg/appsmith/actions/runs/8421752151)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Chores**
- Updated actions/cache and actions/setup-node to v4 across various
workflows for improved caching and Node.js setup.
- Modified the `yarn install` command to use `--immutable` flag,
enhancing dependency management.
- **Documentation**
- Updated comments within workflows to include cautionary and important
notes, ensuring better clarity.
- **Refactor**
	- Adjusted caching paths and keys for more efficient caching behavior.
- Changed Node.js installation to version 20.11.1 in Dockerfile,
aligning with the latest version for better performance and security.
- **Tests**
- Modified assertion in `getCurrentLocationSaga` test to check for the
presence of a property, improving test accuracy.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Aman Agarwal <aman@appsmith.com>
2024-03-26 14:12:11 +03:00
Arpit Mohan
2650ea161d
ci: Updating actions/checkout to v4 and defaulting to fetch-depth 1 instead of 0 (#29281)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated GitHub Actions workflows to use `actions/checkout@v4` for
improved performance and reliability.
- Removed `fetch-depth` parameter to simplify checkout steps across
various workflows.
  - Standardized quote usage for consistency in workflow files.

- **Documentation**
- Adjusted formatting and descriptions in workflow files for better
clarity and readability.

- **Refactor**
- Aligned multiple workflow files to follow a consistent structure and
naming convention.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

fetch-depth 0 causes the Github workflow to checkout the entire Git
history. This is not required. We only need to check out the head of the
commit. By default, actions/checkout has fetch-depth=1, hence removing
it from the workflow completely for simplicity.
2023-12-05 13:44:43 +05:30
Arpit Mohan
8c132c780f
ci: Cleaning up CI workflows from warnings and unnecessary logs (#29280)
## Summary by CodeRabbit

- **Chores**
- Updated `umani/changed-files` action to v4.1.0 across various workflow
files.
- Updated `peter-evans/create-or-update-comment` action to v3 in
multiple workflow files.
  - Minor adjustments to workflow syntax for consistency and accuracy.

- **Documentation**
  - Corrected URLs in Slack notification messages to ensure accuracy.

- **Refactor**
- Removed redundant job configurations and steps related to caching and
storing run results.
- Streamlined environment variable usage by sourcing values from
secrets.

- **Style**
- Standardized quote usage in workflow files for file matching patterns.

- **Bug Fixes**
- Fixed URLs in echo statements within `test-build-docker-image.yml` to
point to the correct "cypress-dashboard" path segment.
- Updated `slack_color` and `slack_icon` values to better reflect
success and failure states in notifications.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2023-12-03 14:53:15 +05:30
Goutham Pratapa
dba56223f1
feat: skip-tests for rts (#29014) 2023-11-21 19:57:50 +05:30
Shrikant Sharat Kandula
988f60e7ff
ci: Add BASE build argument for DP builds 2023-10-18 17:31:30 +05:30
Shrikant Sharat Kandula
6a1dc289d1
ci: Remove installs of packages already available (#27123)
We're installing quite a few pieces of software, although they're
already availble in the CI environments. See
https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md.

This has led to one failure where it failed to download Helm (because of
a sporadiv 403), where `helm` was already installed and this step wasn't
even needed.

This PR does this:

1. Print the versions of the tools we need.
2. Install MongoSH v6.
3. Install Kubectl pinned to v1.23, since the one that comes by default
is 1.28, which is too new.

References:

[As seen in this
run](https://github.com/appsmithorg/appsmith/actions/runs/6121523768/job/16617184408).
<img width="562" alt="shot-2023-09-09-00-53-35@2x"
src="https://github.com/appsmithorg/appsmith/assets/120119/cfe95a40-28cd-4a13-8071-58438e94ba69">

[MongoDB v6
installation](https://www.mongodb.com/docs/v6.0/tutorial/install-mongodb-on-ubuntu/#install-mongodb-community-edition).
2023-09-11 17:38:20 +05:30
Valera Melnikov
826d58f813
chore:update node version to v18 (#26358)
## Description
Update node version

---------

Co-authored-by: Valera Melnikov <melnikov.vv@greendatasoft.ru>
2023-08-15 18:56:04 +05:30
Shrikant Sharat Kandula
75eea5b87d
ci: Make info json script optional 2023-08-07 14:23:50 +05:30
Goutham Pratapa
c6d9357f88
chore: add deployment dp params (#26002) 2023-08-04 10:40:25 +05:30
Goutham Pratapa
bc24d03dbd
Revert "update: migrate dp from sts to deployments (#25615)" (#25996)
This reverts commit 6762d2ce90.
2023-08-03 23:40:06 +05:30
Goutham Pratapa
6762d2ce90
update: migrate dp from sts to deployments (#25615) 2023-08-03 19:02:17 +05:30
Shrikant Sharat Kandula
e8c3cc19a2
chore: Add info.json to Docker images (#25948)
This adds a `/opt/appsmith/info.json` file to Docker images, with the
following sample content:

```json
{
  "commitSha": "0521ba2c0d7a62cef3d4def66fc15b59cc34ceef",
  "commitUrl": "0521ba2c0d",
  "branch": "release",
  "date": "2023-08-02T12:52:53+00:00",
  "isCI": false
}
```

We're enabling this only for images built for DPs currently, and will
then extend to other workflows as well.

Notice that we copy `info.*json` instead of `info.json`. The reason is
so that the Docker build doesn't fail, even if the `info.json` file
doesn't exist. This lets us publish this to each workflow in turn,
slowly and carefully.

[Relevant Slack
conversation](https://theappsmith.slack.com/archives/C02MUD8DNUR/p1686197957141419).
2023-08-02 18:36:59 +05:30
Shrikant Sharat Kandula
e0962f3a1c
ci: Use vars.EDITION instead of hard-coded edition to avoid conflicts with EE sync (#25870)
Note: Please review/approve only, do not merge. This PR is expected to
cause conflicts and so I'd like to be around when this is merged.
2023-08-02 14:35:08 +05:30
Shrikant Sharat Kandula
24a12d55d3
ci: Update docker/build-push-action to v4 (#25906)
The currently used `v1` is deprecated, and not recommended anymore. The
`v4` changes a few things. Some details are in the following pages:

1. https://github.com/docker/build-push-action/blob/v2/UPGRADE.md
2.
4fad532b9f/README.md (customizing)

Essentially, in the current code, `build-args` isn't working. This
should fix that.
2023-08-02 10:43:37 +05:30
Goutham Pratapa
c2b6b92e73
ci: vercel dp comments (#25898) 2023-08-01 15:46:36 +05:30
Shrikant Sharat Kandula
818d997d5d
ci: Default to release CS unless building for prod (#25856)
When running Appsmith release image, it's currently using production CS,
which is causing a lot of incompatibility related errors since `release`
moves much faster than prod.

This changes this. Note that for `:latest` and `:nightly` images, we do
NOT change this default. There's no change for Docker images with those
tags. We _only_ want change `:release` image, DP images, and images
built for Cypress runs.
2023-08-01 07:35:01 +05:30
Goutham Pratapa
3f8db42522
fix: failing-vercel-dps (#25851)
Fixes:
https://github.com/appsmithorg/appsmith/actions/runs/5713787930/job/15479827656#step:9:30

---------

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-07-31 20:51:35 +05:30
Shrikant Sharat Kandula
5a9abe0075
ci: Add a note about Vercel DPs with env=release (#25211)
Non-impacting change, only adds some more content to the DP URL comment.

More context around this at
https://notion.so/031b87bce3404e3a95240d4c14c82e46.
2023-07-31 10:19:20 +05:30
Valera Melnikov
9f607d250d
chore: move local dependency to packages (#23395)
## Description
1. Move everything related to client from app folder to client folder
(`.yarn`, `yarn.lock`, package.json, .gitignore)
2. Move `ast` and `rst` to client packages
3. Fix running scripts in packages
4. Add running unit tests in packages in CI

TODO: It is necessary to consider enabling the `nmHoistingLimits:
workspaces` option, since now all packages are hoisted to the root,
there may be issues with dependencies in workspaces. Also, there is a
possibility of implicit use of packages.

https://yarnpkg.com/configuration/yarnrc#nmHoistingLimits

#### PR fixes following issue(s)
Fixes #23333

#### Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## Testing

#### How Has This Been Tested?
- [x] Manual
- [x] Jest
- [x] Cypress

## Checklist:
#### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] 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
- [ ] PR is being merged under a feature flag

Co-authored-by: Valera Melnikov <melnikov.vv@greendatasoft.ru>
2023-05-22 15:55:46 +03:00
Goutham Pratapa
3bfaf5a070
fix: vercel deploy previews (#23221) 2023-05-11 15:50:50 +05:30
Goutham Pratapa
e8783eb672
Fix vercel builds (#23219) 2023-05-11 15:28:05 +05:30
Satish Gandham
e8f76a9db1
ci: Fix an incorrect artifact download path (#23208)
Co-authored-by: Satish Gandham <hello@satishgandham.com>
2023-05-11 12:49:56 +05:30
Satish Gandham
83538ad74d
feat: Bundle optimization and first load improvements (#21667)
Co-authored-by: Ivan Akulov <mail@iamakulov.com>
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Ivan Akulov <iamakulov@outlook.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: somangshu <somangshu.goswami1508@gmail.com>
2023-05-11 10:56:03 +05:30
Goutham Pratapa
9b37810c7b
ci: add recreate option for dps (#22091)
fixes: [248](https://github.com/appsmithorg/cloud-deployment/issues/248)


https://github.com/appsmithorg/appsmith-ci/pull/14#issuecomment-1504569726
This doesnt delete the existing stacks 


https://github.com/appsmithorg/appsmith-ci/pull/14#issuecomment-1504842238
this deletes the stack, database in mongo and therefore creating a
complete new stack
2023-04-14 16:27:17 +05:30
Shrikant Sharat Kandula
64edd25a8b
ci: Use vars for DOCKER_HUB_ORGANIZATION (#22177)
GitHub's Variables, unlike Secrets, don't get masked in the output, and
are ideal for non-secret... _variables_. I'm switching on such secret
here, and depending on our experience with this, we'll look to moving
more.

Of course, goes without saying, do NOT use these variables for secrets.
When in doubt, use Secrets.

[Learn more about
Variables](https://docs.github.com/en/actions/learn-github-actions/variables).
2023-04-10 14:23:12 +05:30
Goutham Pratapa
47750db727
ci: add comments for vercel-deploy-preview (#21349)
**/build-deploy-preview env=release**

![Screenshot 2023-03-14 at 9 49 44
AM](https://user-images.githubusercontent.com/15846947/224892349-588b3460-0b8d-4937-9b94-4013d03275a0.png)

---------

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-03-16 17:32:32 +05:30
Goutham Pratapa
891df1dc33
ci: build lite version of deploy preview (#21078)
**Case-1:**

**`/build-deploy-preview skip-tests=true`**

**Client-jest skipped**
![Screenshot 2023-03-01 at 3 40 04
PM](https://user-images.githubusercontent.com/15846947/222109174-74749203-eafa-4694-ac5f-f5713942d07b.png)
**Server Build taking less time**
![Screenshot 2023-03-01 at 3 40 46
PM](https://user-images.githubusercontent.com/15846947/222109336-6771357f-6acf-4e5f-a428-ae73d057bf44.png)

**Case-2:**

**`/build-deploy-preview `**
![Screenshot 2023-03-02 at 11 54 37
AM](https://user-images.githubusercontent.com/15846947/222649676-f78f9f58-d918-4c74-961a-a5405481ab4c.png)


**Case-3**

**`/build-deploy-preview  env=release`**

![Screenshot 2023-03-07 at 8 05 38
PM](https://user-images.githubusercontent.com/15846947/223453763-35a0f5b5-b941-4349-80bc-a024deed5a08.png)

**github-action**
![Screenshot 2023-03-07 at 8 05 58
PM](https://user-images.githubusercontent.com/15846947/223453797-fad9b60e-f363-44b2-a7a0-2a954f1a4dac.png)

**final-dp:**

![Screenshot 2023-03-07 at 8 06 46
PM](https://user-images.githubusercontent.com/15846947/223454037-5725d6e5-18ff-4e9f-bd8d-3b181887ec75.png)
2023-03-08 15:07:30 +05:30
Goutham Pratapa
568544b5a3
ci: fix artifact names across the ci (#20586)
Fix: artifact names across CI
2023-02-13 14:45:02 +05:30
Goutham Pratapa
afc5c94cf7
fix: failing ce deploy previews (#20204) 2023-01-30 13:37:55 +05:30
Goutham Pratapa
a8689792dc
ci: make upgrades easy to deploy-previews (#20198)
Make upgrades easy for deploy previews.
2023-01-30 11:49:22 +05:30
Goutham Pratapa
365afd2e94
ci: fix github-actions trigger sequence (#20138) 2023-01-27 15:34:58 +05:30
Goutham Pratapa
506b0230d5
ci: add cosmetic changes to deploy-preview ci (#20131) 2023-01-27 11:31:55 +05:30
Goutham Pratapa
5ad64598ac
chore: Deploy preview of a PR (#19988)
Successful-run: https://github.com/appsmithorg/appsmith-ci/actions/runs/3986060223

Example: https://github.com/appsmithorg/appsmith-ci/pull/2

### How to trigger the workflow

[Reference](https://github.com/appsmithorg/appsmith-ci/pull/2#issuecomment-1400174700) 

go ahead and comment:

```
/build-deploy-preview
```
If the commit is fine then you should another comment from github-actions like below
```
Tests running at: https://github.com/appsmithorg/appsmith-ci/actions/runs/xxxxxx
Workflow: On demand build Image and deploy Deploy-Preview.
PR: #.
URL: #ce.appsmith.com
```
2023-01-26 14:05:11 +05:30