![]() ![]() assuming “everything else” uses a common dev environment). For our example, the env variables will differ based on if the branch we’re building is master or something else (develop, feature branches, etc. ![]() The first thing I like to do is create a step for defining environment variables. ![]() So we’ve set up the workflow - now we need to add steps so we can get something done. Name: Build + Teston: pushjobs: build: name: Build runs-on: ubuntu-latest steps: We’ll have two workflow files: build+test.yml and deploy.yml #Github actions cache how toOkay, now that you know how to fly this thing, some sidenotes about today’s lesson: Github Actions uses YAML files for workflow configuration (similar to CircleCI, TravisCI, etc.) Instead of restating the documentation, I highly recommend you skim this. For sake of example, we’ll pretend we only have a dev and production server. When we make a change in the application repository, we want that change to build an image, be tested, and be deployed to the appropriate server. We’re using Google Cloud Platform (most of this is applicable if you’re using AWS or something similar). We have a repository for DevOps (deployment scripts, etc.). We have a containerized repository for our application code (can be backend, frontend, both, etc.). I found it really difficult to find articles on setting up a production system and battling some of the issues that non-hobbyists will encounter. Because GHA is such a new tool (generally available as of ), most of the online resources are “here’s how you do this super simple task”, or “here’s a rewording of the documentation which is already confusing”. This is really a simplified version of what I’ve been doing at work at Agrando over the past few weeks. Today we’ll be building a CI/CD pipeline using Github Actions (GHA) □ navigating the gotchas and pitfalls of a new good-but-not-perfect tool ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |