Help us understand the problem. What is going on with this article?
æ¦è¦ ããéçºä¸ããã¸ã§ã¯ãã§ãããã¾ã§ JS ã®ãã¹ãã«ãã¬ãã¸ãæ´»ç¨åºæ¥ã¦ããªãã£ããã軽ãæ°æã¡ã§ãã£ã¦ããããããã éçºç°å¢ã§ã¯è¨å®ããé¾å¤ãè¶ããã®ã« CI ä¸ã§ã¯ãã¹ããªããããããã¤ã§ããªãã¨ããç¶æ³ãèµ·ããã¾ããã ç°å¢ éçºãã·ã³ OS: maxOS 10.12.6 Node.js: 10.8.0 npm: 6.3.0 CI (Wercker) OS: Debian stretch-slim Node.js: 8.x npm: 6.x ã©ã¡ãã Jest ã®ãã¼ã¸ã§ã³ã¯ 23.4.1 ãå©ç¨ãã¦ããã è¨å®ã package.json ã«è¨è¿°ãã¦ããããå ±éã®ãã®ãå©ç¨ãã¦ãã¾ãã ã¾ããã«ãã¬ãã¸ã«é¢ããè¨å®ã¯é¾å¤ã®è¨å®ããè¡ã£ã¦ãã¾ããã Jest å®è¡æã®ã³ãã³ãã¯ä»¥ä¸ã
èæ¯ dep ã使ã£ã Golang ã®ãã«ãã§åã wercker.yml ã使ã£ã¦ããã®ã« Wercker CLI ã® Local Mode ã§ã¯ wercker build ãéãã®ã«ãWercker ã® Web å´ã§ã¯éããªãã£ãã èª¿æ» ã¨ã©ã¼ãã° go build ã®æ®µéã§å¤±æãããã®ãã°ã¯ go build main.go:x:x: cannot find package "github.com/pkg/errors" in any of: /usr/local/go/src/github.com/pkg/errors (from $GOROOT) /go/src/github.com/pkg/errors (from $GOPATH) make: *** [build] Error 1 ã¨ãããã±ã¼ã¸ã GOROOT ããã³ GOPATH ã§è¦ã¤ãããªãã¨ã®ãã¨ã dep
build: steps: # ããã¸ã§ã¯ãã«ã¼ãã GOPATH é ä¸ã«ç§»å - wercker/setup-go-workspace: package-dir: <SOME_PATH> # glide ãã¤ã³ã¹ãã¼ã«ã㦠glide install ãã - glide-install # ãã«ã - script: name: compile binary code: | go build # ãã¹ã - script: name: test code: | go test ä¸è¨ã§ãã¼ã«ã«/Webå ±ã«CIãéãããã«ãªã£ãã èª²é¡ Wercker 㧠Go ã® CI ãå®è¡ã§ããããã«ãªã£ãããããã dep ã¸ã®å¯¾å¿ã¯ã§ãã¦ããªãã glide èªèº«ã dep ã¸ã®ç§»è¡ãä¿ãã¦ããã®ã§ã dep ã«å¯¾å¿ãããã wercker/step-glide-install ãåèã«ã㦠s
GitHubã§å©ç¨ã§ããCIã®ã²ã¨ã¤ãWerckerã®åºç¤ç¥èã«ã¤ãã¦ã¾ã¨ãã 1.Werckerã¨ã¯ 2012å¹´ã«ãªã©ã³ãã§èªçããCI-as-a-Serviceããªãã¸ããªã¸ã®ã½ã¼ã¹ã³ããããããªã¬ã¼ã¨ãã¦ã¢ããªã±ã¼ã·ã§ã³ã®ãã«ãããã¹ãããããã¤ãèªååã§ãããµã¼ãã¹ãèªã¿æ¹ã¯ãã¯ã¼ã«ã¼ãã githubãbitbucketã§å©ç¨ãããã¨ãã§ããã 2.ç¹å¾´ Werckerã¯ããªãã¸ããªã®ã«ã¼ãã«ãwercker.ymlããæºåãããã®ä¸ã«ãã¹ãã®å®è¡ç°å¢ããããã¤ã³ãã³ãããããããè¨è¼ãã¦ãããã¨ã«ããã½ã¼ã¹ãã³ããããããã¿ã¤ãã³ã°ã§èªåçã«è¨è¿°ãããå¦çãè¡ã£ã¦ãããã Werckerã§ã¯ããã®å®è¡ç°å¢ã"box"ãã³ãã³ã群ã"step"ã¨ãã¦èªä½ãããã¨ãã§ããããããWercker Directoryãã«ç»é²ãã¦ãããã¨ã§æ§ã ãªãã¹ãããå®è¡ç°å¢ãã³ãã³ã群ãå¼ã³åºãã
werckerå°å ¥æé â ååã¯werckerã®ç»é²ã¨ã¢ããªã±ã¼ã·ã§ã³ã®ä½æã¾ã§è¡ãã¾ããã®ã§ãä»åã¯ymlã¨ããwerckerã®è¨ å®ãã¡ã¤ã«ã®ä½æããé åã¾ã§ãè¡ãã¾ãã ããã¾ã§ã§ä¸æ¦æä½éã®å°å ¥ã¯å®äºã¨ãªãã¾ãã ymlã£ã¦ï¼ YAMLã¨ãã表ç¾è¨æ³ã®æ¡å¼µåã§ããYAMLã¨ã¯ä½ãï¼ã¨ããã¨æ§é åãããã¼ã¿ãè¨è¿°ããããã®è¡¨ç¾è¨æ³ã§ãRubyããã¬ã¼ã ã¯ã¼ã¯ããã¼ã«ã®è¨å®ãã¡ã¤ã«ãªã©ã§ãã使ãã¾ãã 詳ããã¯ãã¡ãã®è¨äºã§åãããããã¾ã¨ãããã¦ãã¾ãã Werckerã§ã¯ãã®YAMLã使ã£ã¦ãã«ãããããã¤ã®æé ãè¨è¼ãã¦ããã¾ãã wercker.ymlã®è¨å® ä½æããã¢ããªã±ã¼ã·ã§ã³ãé¸æãããrunsãã¿ããã使ç¨è¨èªãé¸æã ï¼ããã§ã¯rubyãé¸æï¼ ymlã®å 容ãã³ãã¼ãããã¡ã¤ã«åã"wercker.yml"ã¨ãã¦ä¿åããã box: ruby:2.4.2 servi
box: ruby services: # ãã®nameãpostgresã«ãã¦ãããªãã¨ã³ã³ããéã®ãªã³ã¯ãã§ããªã - name: postgres id: mdillon/postgis env: POSTGRES_PASSWORD: $POSTGRES_PASSWORD POSTGRES_USER: $POSTGRES_USER build: steps: - bundle-install - rails-database-yml: service: postgresql-docker - script: name: rspec code: bundle exec rspec
wercker.ymlãä½æããã¨ãã¯ãCLIã§ãã¼ã«ã«å®è¡ãã¦ç¢ºèªããã¨æ¥½ã ã¤ã³ã¹ãã¼ã«ï¼Linuxã®å ´åï¼ äºãDockerãã¤ã³ã¹ãã¼ã«ãã¦èµ·åãã¦ããã å ¬å¼ã«æ¸ãã¦ããéããä¸è¨ã³ãã³ãã§ã¤ã³ã¹ãã¼ã«ï¼rootã§å®è¡ï¼ï¼ curl -L https://s3.amazonaws.com/downloads.wercker.com/cli/stable/linux_amd64/wercker -o /usr/local/bin/wercker chmod u+x /usr/local/bin/wercker
ç¾å¨ã®ã¨ãããæä¾ããã¦ããendpointã¯4ã¤ãä»å¾æ¡å ãã¦ããã¨ã®ãã¨ã applications runs buildsï¼å¤ãstackã®ã¦ã¼ã¶ã¼åããæ°ããã¦ã¼ã¶ã¼ã¯runsã使ããã¨ï¼ deploysï¼å¤ãstackã®ã¦ã¼ã¶ã¼åããæ°ããã¦ã¼ã¶ã¼ã¯runsã使ããã¨ï¼ ãã¼ã¯ã³ã®åå¾æ¹æ³ ç»é¢å³ä¸ã®èªåã®ã¢ãã¿ã¼âSettingsâPersonal tokens ãããã¼ã¯ã³ãçºè¡ã§ããããã¼ã¯ã³çºè¡å¾ã¯è¦ããªããªãã®ã§ã¡ã¢ãã¦ãããã¨ã applicationä¸è¦§ â»$WERCKER_USERNAMEã¯ãã°ã¤ã³ããã¨ãã®åå
åºç¤æ¦å¿µ step pipelineï¼build deploy devãªã©ã®ãã¨ï¼ workflowï¼pipelineãããã«çµã¿åããããã®ï¼ serviceï¼PostgresãElasticSearchãªã©ã使ãããå ´åã¯ãããããserviceã¨ãã¦æå®ããï¼ application user organization ããã©ã«ãã§ã¯applicationã¯publicã«ãªã£ã¦ããã®ã§æ³¨æã werckerã®ä»çµã¿ werckerã¯Dockerãã¼ã¹ã§ãã boxã§æå®ããDockerã³ã³ããå ã§å®è¡ããã boxã«ã¯Docker Hubã«ç»é²ããã¦ããDockerã¤ã¡ã¼ã¸ããªãã§ãæå®ã§ãã PostgresãElasticSearchãªã©ã使ãã«ã¯serviceã使ã serviceã¯å¥ã®Dockerã³ã³ããã¨ãã¦å®è¡ãããDocker Linkã«ãã£ã¦ãªã³ã¯ããã ããã³ã³ãã
ã¯ããã« Serverless Frameworkãå©ç¨ãã¦AWS Lambdaã®é¢æ°ãpythonã§éçºãã¦ãã¾ãã æ©è½å®è£ ãããã³ã«ãããã¤ããã®ãé¢åã ã£ãã®ã§ãCIãµã¼ãã¹ã§ããWerckerã使ã£ã¦èªååããã¨ãã®ã¡ã¢ã¨ãªãã¾ãã AWS Lambdaã®Functionããã㤠ä½ãèããã«ãããã¤ãããã¨ããã¨ããã¼ã«ã«ç°å¢ã§éçºããã³ã¼ã群ãzipãã¡ã¤ã«ã«ã¢ã¼ã«ã¤ããã¦AWSã®ã³ã³ã½ã¼ã«ããã¢ãããã¼ãããæãã«ãªãã¾ãã ãããã¤ä»¥å¤ã«ããã¹ãå®è¡ãªã©è²ã ã¨é¢åãªã®ã§ãå¤ãã®äººãServerless Frameworkãå©ç¨ãã¦ããã¨æãã¾ãã Serverless Frameworkãå©ç¨ããããã㤠Serverless Frameworkã¯ãµã¼ãã¬ã¹ç°å¢ã§ã®APIãFunctionã®éçºããããããã«ãµãã¼ããã¦ãããã©ã¤ãã©ãªã§ãã ãããã¤ã以ä¸ã®ãããªã³ãã³
Google App Engineã£ã¦ãµã¼ãã¬ã¹ã§å¤§ä½ã®ãã®ã¯ä½ããã®ã§ãã¨ã£ã¦ã便å©ãªæãã§ãã ãã ããããã¤ãããã¨ããã¨ãã©ããã®ãã·ã³ãªããµã¼ãã§deployã³ãã³ããå©ããªãã¨ããã¾ããã ç¹å®ã®éçºè ã®ãã·ã³ã«ä¾åããã¨ããããã¤ã®åæ°ãå¤ããªãã¨è² æ ã«ãªãã¾ããããã·ã³ãã¯ã©ãã·ã¥ããã¨ãããã¤ã§ããªããªãâ¦â¦ã¨ããé£ç¹ãã ã¨ã¯ããããããã¤ç¨ã®ãµã¼ããããããç¨æããã¨ä»åº¦ã¯24/365ã§è²»ç¨ããããã¨ãããã¡ãªãããã ã¨ãã訳ã§ãwerckerã使ã£ã¦ã¿ããã¨æãã¾ãã stagingç°å¢ã¯æå®ã®ãã©ã³ãã«pushããã度ã«èªåãããã¤ãæ¬çªã«ã¯ä»»æã®ã¿ã¤ãã³ã°ã§æåã§ãããã¤ã§ããããã«ãã¦ã¿ããã¨æãã¾ãã â»ä½¿ç¨ããã½ã¼ã¹ https://github.com/fumihiko-hidaka/gae-deploy-test ç°¡åãªä»çµã¿ã®å³ ãããã¤è¨å®ãã¡ã¤
TL;DR Githubã«git pushããã¨èªåCIããã¹ããã¦ãããããã«ãããæé«ã§ã¤ããã¨ã³ã¸ãã¢ã®äººãã¡ããèªåCI/CDã¯å½ããåãã¨è¨ã£ã¦ãæå³ãå®ç§ã«ç解ããã Oracle + Wercker ç¾å¨ã¯èªåCDã¾ã§ã¯è¡ã£ã¦ããªãã¦git pushâCI(Wercker)âSlackéç¥ã¨ããæµãã«ãªã£ã¦ããã Werckerå°å ¥ä»¥åã¯èª°ããæ¸ããã³ã¼ãã®ä¸é¨ããã¹ããéã£ã¦ãªãã£ãããrubocopãæããããªã³ã¼ãã®æ¸ããæ¹ããã¦ãã¦ãã®ç¶æ ã§ãã¼ã¸ããã¦ãã¾ã£ã¦ä»äººã®ã³ã¼ãã«å½±é¿ãã§ãã¨ãããã¨ãèµ·ãã£ã¦ããã pushããåã«æå ã§ãã¹ãããï¼ã¨ãrubocopåããï¼åé¡ããã°èªåãã©ã¼ãããããï¼ã¨ãã¬ãã¥ã¼ã§ãã¡ãã¨åé¡ã®ããã³ã¼ããææããï¼ã¨ããã®ã¯ããã ã ããããã人éã¯ã ãããèªåã«ã¨ã£ã¦é½åããå¿ãããããããããããªãããã ããã¨æã£ã¦ãã¹ãèµ·ã
Rails ã¢ããªã±ã¼ã·ã§ã³ã®E2Eãã¹ããæ¸ãã¾ããã æ§æ㯠Capybara + Selenium + Headless Chrome ã§ãã ãã®E2Eãã¹ãã Wercker ã§å®è¡ããããã«ã ä¸è¨ã®ã¹ã¯ãªãã㧠Wercker ã« Chrome ãã¤ã³ã¹ãã¼ã«ãã¾ããã - script: name: install chrome headless code: | apt-get update -y wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list apt-
Werckerã§ãMysql2::Error: Authentication plugin 'caching_sha2_password' cannot be loadedããçºçããéã®å¯¾å¦ã«ã¤ãã¦MySQLwercker Werclerã®ããã»ã¹ã失æ é£ä¼æãã®ã¨ããæ¥ããã¤ãã®ããã«git pushããã¨ãCIã«ä½¿ã£ã¦ããWerckerããã¨ã©ã¼éç¥ãå±ããã å 容ãè¦ã¦ã¿ãã¨specã«ãã©ãçã以åã®ããã¹ãç¨DBãä½æããã¹ãããã§ã¨ã©ã¼ã«ãªã£ã¦ããã ã¨ã©ã¼ã¡ãã»ã¼ã¸ã¯ãMysql2::Error: Authentication plugin 'caching_sha2_password' cannot be loadedãã Mysql2::Error: Authentication plugin 'caching_sha2_password' cannot be load
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}