View
153
Download
1
Category
Tags:
Preview:
DESCRIPTION
Goes over setting up a staging and production branch in git and then linking them to production and staging websites for instant updating
Citation preview
@DNNConDon’t forget to include #DNNCon in your tweets!
CONTINUOUS INTEGRATION
AND PUBLISHING IN THE CLOUDJess Coburn
@jesscoburn
@DNNConDon’t forget to include #DNNCon in your tweets!
THANKS TO ALL OF OUR GENEROUS SPONSORS!
@DNNConDon’t forget to include #DNNCon in your tweets!
1. Design our workflow
2. Install Git
3. Create GitHub Repository
4. Create Local Repository
5. Link Website with Github Repository
6. Sync with Github
7. Publish
8. Publish Staging, Production and Hotfixes
Presentation Overview
@DNNConDon’t forget to include #DNNCon in your tweets!
Because Fat Fingers exist!
Why Source Control?
@DNNConDon’t forget to include #DNNCon in your tweets!
Designing Our Workflow
C0 C4 C10
Production
Staging
HotFixes
C0 C1 C2
C0 C6 C10
C.. C9 C10
@DNNConDon’t forget to include #DNNCon in your tweets!
Working With Branches
f9ec2 e3a5c b3a24 34a3c 87c2f ff33e
master
hotfix01 staging
@DNNConDon’t forget to include #DNNCon in your tweets!
Continuous Integration Diagram
Local Repo
Local Repo
Code Repo|_ Master|_ Staging|_ Etc..
Production
Staging
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize GitHub Repositories
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize GitHub Repositories
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize GitHub Repositories
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize GitHub Repositories
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize Remote Repository
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize Remote Repository
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize Remote Repository
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize Remote Repository
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize Remote Repository
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize Remote Repository
@DNNConDon’t forget to include #DNNCon in your tweets!
Installing Git
@DNNConDon’t forget to include #DNNCon in your tweets!
Installing Git
@DNNConDon’t forget to include #DNNCon in your tweets!
Installing Git
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize Local Repository
git init – Initializes a local repository for code.
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize Local Repository
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize Local Repository
git add filename – adds file to local repositorygit add --all – Adds everything but those in the .gitignore file.
@DNNConDon’t forget to include #DNNCon in your tweets!
Initialize Local Repository
git commit –m “text” -- Makes a local commit and provides notes.
@DNNConDon’t forget to include #DNNCon in your tweets!
Add GitHub Repository
git remote add NAME URL – Adds a remote repository and names it.
@DNNConDon’t forget to include #DNNCon in your tweets!
Pull GitHub Repository Files
git pull github master - Pulls the master branch from our githubremote.
@DNNConDon’t forget to include #DNNCon in your tweets!
Push My Files to GitHub
git push github master – Pushes any changed files back up to the master branch
@DNNConDon’t forget to include #DNNCon in your tweets!
My Site Automatically Updates
@DNNConDon’t forget to include #DNNCon in your tweets!
My Site Automatically Updates
@DNNConDon’t forget to include #DNNCon in your tweets!
Create Staging Branch & Push
git checkout –b staging – creates a staging branch and moves us into it.
git push github staging – performs a sync.
git branch – Shows the current branchs and where the “HEAD” pointer is.
@DNNConDon’t forget to include #DNNCon in your tweets!
Establish Staging Branch with Staging Site
@DNNConDon’t forget to include #DNNCon in your tweets!
Establish Staging Branch with Staging Site
@DNNConDon’t forget to include #DNNCon in your tweets!
Establish Staging Branch with Staging Site
@DNNConDon’t forget to include #DNNCon in your tweets!
Establish Staging Branch with Staging Site
@DNNConDon’t forget to include #DNNCon in your tweets!
Establish Staging Branch with Staging Site
@DNNConDon’t forget to include #DNNCon in your tweets!
@DNNConDon’t forget to include #DNNCon in your tweets!
@DNNConDon’t forget to include #DNNCon in your tweets!
@DNNConDon’t forget to include #DNNCon in your tweets!
But What About Production?
@DNNConDon’t forget to include #DNNCon in your tweets!
Merging Master and Staging
git branch – check branch statusgit checkout master – switch to master repositorygit merge staging – merging the staging with our master
@DNNConDon’t forget to include #DNNCon in your tweets!
Merging Master and Staging
git branch – check branch statusgit checkout master – switch to master repositorygit merge staging – merging the staging with our master
@DNNConDon’t forget to include #DNNCon in your tweets!
Reviewing Portal
@DNNConDon’t forget to include #DNNCon in your tweets!
Reviewing Portal
@DNNConDon’t forget to include #DNNCon in your tweets!
@DNNConDon’t forget to include #DNNCon in your tweets!
But Wait…
@DNNConDon’t forget to include #DNNCon in your tweets!
Defines files you don’t want to push to
repository.
There’s more … .gitignore
web.config*.exe[Dd]ebug.*Obj/
https://github.com/dnnsoftware/Dnn.Platform/blob/development/.gitignore
@DNNConDon’t forget to include #DNNCon in your tweets!
Automatically sync’d with latest master build of DNN?
What else?
@DNNConDon’t forget to include #DNNCon in your tweets!
CONTINUOUS INTEGRATION
AND PUBLISHING IN THE CLOUDJess Coburn
@jesscoburn
Recommended