+ All Categories
Home > Software > There is-no-snapshot

There is-no-snapshot

Date post: 12-Jul-2015
Category:
Upload: ole-christian-langfjaeran
View: 224 times
Download: 0 times
Share this document with a friend
63
THERE IS NO SNAPSHOT Hvordan vi senket release fra halv dag til halv time
Transcript
Page 1: There is-no-snapshot

THERE IS NO SNAPSHOTHvordan vi senket release fra halv dag til halv time

Page 2: There is-no-snapshot

Compile once

Gradle

YOU WILL LEARN

Page 3: There is-no-snapshot

DISCLAIMERIt’s JVM

Page 4: There is-no-snapshot

BACKGROUND

• Monolitt

• 46 modules

• ca 2100 .scala

Page 5: There is-no-snapshot

• Build

• Test

• Integrasjonstest

• Release

• Deploy

• Maven

Page 6: There is-no-snapshot

COMPILE, COMPILE, COMPILE

Compile + test

Integration-test mvn release

Page 7: There is-no-snapshot

COMPILE, COMPILE, COMPILE

Compile + test

Integration-test mvn release

25-60 mins 50-120 mins 60-120 mins

Page 8: There is-no-snapshot

SUM• min 2t 30 mins

• til tider 5t eller mer

• samtidige bygg == crash

Page 9: There is-no-snapshot

TENK NYTT

Page 10: There is-no-snapshot

HOW?

Page 11: There is-no-snapshot

COMPILE, COMPILE, COMPILE

Compile + test

Integration-test mvn release

Page 12: There is-no-snapshot

COMPILE, COMPILE, COMPILE

Compile + test Snapshots

Page 13: There is-no-snapshot

COMPILE, COMPILE, COMPILE

Compile + test1.10.69

major.minor.buildnumber

Page 14: There is-no-snapshot

OTHERS

????

Page 15: There is-no-snapshot

DOOR #1

Page 16: There is-no-snapshot

MAVEN

Page 17: There is-no-snapshot

DOOR #2

Page 18: There is-no-snapshot

SBT

Page 19: There is-no-snapshot
Page 20: There is-no-snapshot

DOOR #3

Page 21: There is-no-snapshot
Page 22: There is-no-snapshot

GRADLE

Page 23: There is-no-snapshot

PROS• Inkrementell og parallell

kompilering • Zinc• Deployscripts i Groovy • Unittest buildscripts• gradle wrapper • Stort community• ++

Page 24: There is-no-snapshot
Page 25: There is-no-snapshot

PLUGINS

Promoted Build

Clone Workspace Copy Artifact

Parameterized Trigger Gradle

Page 26: There is-no-snapshot

PLUGINS (NICE)

Cloudbees Folders Build Pipeline

Git Pull Request Builder

Disk UsageJob Config History

Jenkins slaves

Page 27: There is-no-snapshot

PSEUDO EKSEMPEL

Page 28: There is-no-snapshot

Default parameter VERSION=0.9

Page 29: There is-no-snapshot

echo version=${VERSION}.${BUILD_NUMBER} >> gradle.properties

Page 30: There is-no-snapshot

gradle.properties: version=0.9.3

Page 31: There is-no-snapshot

gradle clean test assemble --parallel

Page 32: There is-no-snapshot

archive artifact: embedded-jetty-app.jar

Page 33: There is-no-snapshot

archive workspace

Page 34: There is-no-snapshot

Trigger Send med JOB_NAME, BUILD_NUMBER, Git commit

Page 35: There is-no-snapshot

Clone workspace

Page 36: There is-no-snapshot

gradle integrationtest -x compileScala (++)

Page 37: There is-no-snapshot

git pull ${init_job_git_commit}

Page 38: There is-no-snapshot

Sjekk for snapshot avhengigheter

Page 39: There is-no-snapshot

Logg inn som PROD-deploy-bruker

Page 40: There is-no-snapshot

Press Play on tape

Page 41: There is-no-snapshot

curl slack.com channel #prod: “🚀 we have liftoff”

Page 42: There is-no-snapshot

Promote to PROD

Page 43: There is-no-snapshot

PROMOTED BUILD

Page 44: There is-no-snapshot

PROMOTED BUILD

👎

Foretrekk Build Pipeline

Page 45: There is-no-snapshot

git tag v0.9.3

Page 46: There is-no-snapshot

Keep build forever (look Ma! No Nexus/Artifactory!)

Page 47: There is-no-snapshot

IN REAL LIFE

Create release version in JIRA

Update minor version in step one

Page 48: There is-no-snapshot

CLEAN, COMPILE, TEST,INTEGRATIONTEST

• avg = 25 mins• spikes på 30+ mins skyldes

samtidige pull request bygg• alle bygg har final

versjonsnummer

• who broke the build?

Page 49: There is-no-snapshot

WILL MY PULL REQUEST COMPILE?

Page 50: There is-no-snapshot
Page 51: There is-no-snapshot
Page 52: There is-no-snapshot

Github flow

The git-flow process is designed largely around the “release”. We don’t really have “releases” because we deploy to

production every day – often several times a day.

Page 53: There is-no-snapshot

COMMIT STATUS APIhttps://github.com/blog/1227-commit-status-api

Page 54: There is-no-snapshot
Page 55: There is-no-snapshot
Page 56: There is-no-snapshot
Page 57: There is-no-snapshot

masterFFS-666

Page 58: There is-no-snapshot
Page 59: There is-no-snapshot

WILL YOU APPROVE MY

PULL REQUEST?

Page 60: There is-no-snapshot

DEPLOYFeature toggleRelease branch

Page 61: There is-no-snapshot

WILL YOU SUM IT UP

• Bygg alt med unikt nummer

• Kompiler én gang

• Gradle(sbt) > Maven

Page 62: There is-no-snapshot
Page 63: There is-no-snapshot

ANSWER YOUR

QUESTIONS

I WILL


Recommended