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

Build: #BBB-142 CI/CD 수정 #63

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Conversation

msjang4
Copy link
Contributor

@msjang4 msjang4 commented Sep 23, 2024

작업 개요

Access Cache Restriction

When a cache is created by a workflow run triggered on a pull request, the cache is created for the merge ref (refs/pull/.../merge). Because of this, the cache will have a limited scope and can only be restored by re-runs of the pull request. It cannot be restored by the base branch or other pull requests targeting that base branch.

develop branch에서 실행되는 CD workflow에서 jar 캐시를 계속 못찾아서 검색해보니, github actions는 branch별로 logical boundary를 통해 캐시 isolation과 security를 제공한다고 한다.

reproducible build

    tasks.named('jar') {
        enabled = true
        preserveFileTimestamps = false
        reproducibleFileOrder = true
    }

우리말로는 재현가능한 빌드라고 하는데 코드가 바뀌지 않으면 완전히 똑같은 Jar 파일이 빌드되는 것이다.
이를 위해서는 timestamp, 빌드한 유저, 파일 순서 등등 영향을 줄 수 있는 것들을 제거해야하며 gradle 세팅파일에 위와 같이 작성하면된다.

ECR 캐싱

image
ECR에 캐싱할때는 image-manifest가 true여야한다고함.

전달 사항

참고 자료

docker/build-push-action#755
[Caching dependencies to speed up workflows - GitHub Docs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache)
https://docs.docker.com/build/cache/backends/#oci-media-types

@msjang4 msjang4 force-pushed the build/cd_with_cache#BBB-142 branch 11 times, most recently from 2e0b521 to c1725d5 Compare September 23, 2024 12:43
@msjang4 msjang4 self-assigned this Sep 23, 2024
@msjang4 msjang4 force-pushed the build/cd_with_cache#BBB-142 branch 2 times, most recently from cf975fe to 40e2827 Compare September 23, 2024 14:47
@msjang4 msjang4 closed this Sep 23, 2024
@msjang4 msjang4 reopened this Sep 23, 2024
@msjang4 msjang4 force-pushed the build/cd_with_cache#BBB-142 branch 7 times, most recently from 6a0ab10 to 0c7ed1c Compare September 23, 2024 16:19
@msjang4 msjang4 force-pushed the build/cd_with_cache#BBB-142 branch from 0c7ed1c to 15f006e Compare September 23, 2024 16:28
@msjang4 msjang4 merged commit ef0683b into develop Sep 23, 2024
1 check passed
@msjang4 msjang4 added the ⚙️Build 빌드 및 패키지 매니저 수정 label Sep 23, 2024
@msjang4 msjang4 mentioned this pull request Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️Build 빌드 및 패키지 매니저 수정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant