Skip to content

[CI] Fixed composer cache for code blocks job #15358

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

Merged
merged 1 commit into from
May 19, 2021

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented May 19, 2021

I've noticed that since we dont have a composer.json file, we cannot get the path to the cache. This PR will fix that.

Screenshot 2021-05-19 at 11 22 39

@Nyholm Nyholm requested a review from OskarStark as a code owner May 19, 2021 09:24
@Nyholm Nyholm changed the base branch from 5.x to 4.4 May 19, 2021 09:24
@javiereguiluz
Copy link
Member

Thank you Tobias.

@javiereguiluz javiereguiluz merged commit 653dea8 into symfony:4.4 May 19, 2021
@Nyholm Nyholm deleted the ci-cache branch May 19, 2021 09:35
@Nyholm
Copy link
Member Author

Nyholm commented May 19, 2021

Thank you for merging

javiereguiluz added a commit that referenced this pull request May 19, 2021
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[CI] Make sure composer cache is properly used

PR #15358 made sure we had a composer cache folder. This PR is making sure we use the cache properly.

Currently, we are using the following paths:
- `/var/workspace/`
- `/var/_checker/`
- `/var/_sf_app/`

The issue is that `hashFiles` only works for files in `/var/workspace/`. So I moved everything down one level.

- `/var/workspace/docs`
- `/var/workspace/_checker/`
- `/var/workspace/_sf_app/`

Now we will use the two new composer.lock files to know if we should save the github cache or not (ie if new dependencies were updated).

I think that the composer cache will contain many versions of a package. Ie, we dont need a separate cache for 4.4 and one of 5.2 etc.

Commits
-------

79a140b [CI] Make sure composer cache is properly used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants