{"id":23694909,"url":"https://github.com/nmfzone/improve-gitlab-ci-cd","last_synced_at":"2026-01-20T15:30:20.024Z","repository":{"id":89768911,"uuid":"164249550","full_name":"nmfzone/improve-gitlab-ci-cd","owner":"nmfzone","description":"Tips to improve Gitlab CI/CD speed","archived":false,"fork":false,"pushed_at":"2019-01-06T15:45:10.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-30T04:32:40.754Z","etag":null,"topics":["continuous-deployment","continuous-integration","docker","gitlab-ci"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nmfzone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-05T20:40:46.000Z","updated_at":"2019-01-10T15:52:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"efe9b294-7f76-4915-975e-667be62a1d1c","html_url":"https://github.com/nmfzone/improve-gitlab-ci-cd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmfzone%2Fimprove-gitlab-ci-cd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmfzone%2Fimprove-gitlab-ci-cd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmfzone%2Fimprove-gitlab-ci-cd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmfzone%2Fimprove-gitlab-ci-cd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nmfzone","download_url":"https://codeload.github.com/nmfzone/improve-gitlab-ci-cd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239763666,"owners_count":19692802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["continuous-deployment","continuous-integration","docker","gitlab-ci"],"created_at":"2024-12-30T04:31:12.971Z","updated_at":"2026-01-20T15:30:19.950Z","avatar_url":"https://github.com/nmfzone.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Improve Gitlab CI/CD\n\nTo improve the Gitlab CI/CD speed, there is a lot of technique. I'll show you some example.\nIn this example, I use Gitlab CI/CD for my NuxtJs application.\n\n## Using Cache\n\nGitlab gives us ability to cache the files on each stage. So, in this example, I need to cache the:\n\n1. node_modules\n2. .nuxt\n3. build (because I used Backpack, with my own server implementation)\n4. Others\n\nTo achieve this, you just need to add the cache config in your `.gitlab-ci.yml`.\n```\ncache:\n  key: \"$CI_COMMIT_REF_SLUG\"\n  paths:\n    - .nuxt/\n    - build/\n    - .env\n    - .test.env\n    - node_modules/\n```\n\nBy using this method, I just need to `build` the project one time (on the `ci_prepare` stage), then for subsequent stage I just need to re-use it.\n\nIn my example, I've 2 tests stage that need Nuxt to be build first, to perform the test. So, instead I build the Nuxt in every stage (that each build needs ~6 minutes), I just need to create one stage named `ci_perepare`, then build once in that stage.\n\n## Using slim docker image\n\nTo improve the speed of Gitlab CI/CD, you should use slim docker image as much as possible.\nFor example, to run deploy stage, that only require `ssh`, I use `nmfzone/ssh-client-light` image, that use alpine linux, so it's just need to pull 5 MB image.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmfzone%2Fimprove-gitlab-ci-cd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmfzone%2Fimprove-gitlab-ci-cd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmfzone%2Fimprove-gitlab-ci-cd/lists"}