{"id":17880826,"url":"https://github.com/nvhoc/gitlab-jobs","last_synced_at":"2026-04-26T23:31:56.066Z","repository":{"id":80941366,"uuid":"247447427","full_name":"nvhoc/gitlab-jobs","owner":"nvhoc","description":"Auto deploy a service","archived":false,"fork":false,"pushed_at":"2021-03-07T22:29:38.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T01:27:30.817Z","etag":null,"topics":["cicd","deploy","deployment","docker","fastdeploy","gitlab","gstore","s3-sync"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nvhoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-03-15T10:50:11.000Z","updated_at":"2022-08-24T03:56:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"66fdc9ab-01df-45fb-851f-9e0c1f1ac9fb","html_url":"https://github.com/nvhoc/gitlab-jobs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nvhoc/gitlab-jobs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvhoc%2Fgitlab-jobs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvhoc%2Fgitlab-jobs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvhoc%2Fgitlab-jobs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvhoc%2Fgitlab-jobs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nvhoc","download_url":"https://codeload.github.com/nvhoc/gitlab-jobs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvhoc%2Fgitlab-jobs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32317163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cicd","deploy","deployment","docker","fastdeploy","gitlab","gstore","s3-sync"],"created_at":"2024-10-28T12:29:02.897Z","updated_at":"2026-04-26T23:31:56.052Z","avatar_url":"https://github.com/nvhoc.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GITLAB JOBS\n\n## Background\nIn Microservice Architecture, we have many small services as repositories and the released time is very short. It's very high-load if we do all thing manually. \n\nThe jobs including:\n- autotag a repo when there are new code in the master branch\n- docker auto push image with new version \n- deploy the service in ec2 using docker\n\n## How to use\n\n1. add .gitlab-ci.yaml in a service's repo\n2. add code \n```\nstages:\n  - tag\n  - build\n  - deploy\n  \ninclude:\n  - remote: https://github.com/nvhoc/gitlab-jobs/releases/download/v1.0.0/default.gitlab-ci.tag.yml\n  - remote: https://github.com/nvhoc/gitlab-jobs/releases/download/v1.0.0/default.gitlab-ci.docker.yml\n  - remote: https://github.com/nvhoc/gitlab-jobs/releases/download/v1.0.0/default.gitlab-ci.ec2-deploy.yml\n\n```\n3. define CI\u0026CD variables:\n\n3.1. to include .gitlab-ci.tag.yml:\n+ generate a pair of key ssh by ssh-keygen =\u003e private_key \u0026\u0026 public_key \n+ set SSH_PRIVATE_KEY=${private_key}  (text)\n+ add public key in \"Deploy Keys\" at \"CI\u0026CD settings\" \n+ set GITHUB_EMAIL=${your bot email}\n+ set GITHUB_USER=${your username}\n\n3.2. to include .gitlab-ci.docker.yml:\n+ set DOCKER_USER_NAME=${your bot username in your docker registry}\n+ set DOCKER_PASSWORD=${your bot password in your docker registry}\n\n3.3. to include .gitlab-ci.ec2-deploy.yml:\n+ note: the file support for simple deployment with docker-compose. I will add new file for k8s later.\n+ set EC2_PEM_KEY=${content of pem file}\n+ set EC2_USER=${ec2 username}\n+ set EC2_HOST=${ec2 public address}\n+ set EC2_DEPLOY_PATH=${ec2 path store docker-compose deployment} find a example at ./example/docker-compose\n\n3.4. to include .gitlab-ci.yarn-build.yml:\n+ set BUILD_PATH=${path of folder from building process}\n\n3.5. to include .gitlab-ci.s3-sync.yml:\n+ set BUILD_PATH=${path of folder that you want to sync to s3}\n+ set S3_DEPLOY_BUCKET=${s3 bucket}\n+ set AWS_ACCESS_KEY_ID=${aws access key}\n+ set AWS_SECRET_ACCESS_KEY=${aws secret key}","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvhoc%2Fgitlab-jobs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnvhoc%2Fgitlab-jobs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvhoc%2Fgitlab-jobs/lists"}