codeship / codeship-pro-tutorial Goto Github PK
View Code? Open in Web Editor NEWA simple introductory tutorial for the Codeship Docker Infrastructure
License: MIT License
A simple introductory tutorial for the Codeship Docker Infrastructure
License: MIT License
jet and docker 1.10.1 won't work together. Container start hang up jet and docker ps.
Please fix.
Hi, I was curious if you have a configuration for rethinkdb. I couldn't find an example on codeship.com.
I tried localhost:28015 but couldn't get it to connect.
This has been baffling me for several days now. Using a cached service, jet intermittently tries to pull the :latest tag instead of the :codeship-cache-{branch} tag. Since I don't push the :latest tag to the registry I end up with intermittent failures that seem very much random:
$ docker rmi myregistry.com/myapp:{latest,codeship-cache-master} ; jet steps --ci-branch=master
Error response from daemon: could not find image: no such id: myregistry.com/myapp:latest
Error response from daemon: could not find image: no such id: myregistry.com/myapp:codeship-cache-master
Error: failed to remove images: [myregistry.com/myapp:latest myregistry.com/myapp:codeship-cache-master]
{StepStarted=step_name:"Build myapp image"}
{PullImageStarted=image_name:"myregistry.com/myapp" service_name:"myapp_build"}
{StepFinished=step_name:"Build myapp image" type:STEP_FINISHED_TYPE_ERROR}
Error: image myapp:latest not found
$ docker rmi myregistry.com/myapp:{latest,codeship-cache-master} ; jet steps --ci-branch=master
Error response from daemon: could not find image: no such id: myregistry.com/myapp:latest
Error response from daemon: could not find image: no such id: myregistry.com/myapp:codeship-cache-master
Error: failed to remove images: [myregistry.com/myapp:latest myregistry.com/myapp:codeship-cache-master]
{StepStarted=step_name:"Build myapp image"}
{PullImageStarted=image_name:"myregistry.com/myapp" service_name:"myapp_build"}
{StepFinished=step_name:"Build myapp image" type:STEP_FINISHED_TYPE_ERROR}
Error: image myapp:latest not found
$ docker rmi myregistry.com/myapp:{latest,codeship-cache-master} ; jet steps --ci-branch=master
Error response from daemon: could not find image: no such id: myregistry.com/myapp:latest
Error response from daemon: could not find image: no such id: myregistry.com/myapp:codeship-cache-master
Error: failed to remove images: [myregistry.com/myapp:latest myregistry.com/myapp:codeship-cache-master]
{StepStarted=step_name:"Build myapp image"}
{PullImageStarted=image_name:"myregistry.com/myapp" service_name:"myapp_build"}
{StepFinished=step_name:"Build myapp image" type:STEP_FINISHED_TYPE_ERROR}
Error: image myapp:latest not found
$ docker rmi myregistry.com/myapp:{latest,codeship-cache-master} ; jet steps --ci-branch=master
Error response from daemon: could not find image: no such id: myregistry.com/myapp:latest
Error response from daemon: could not find image: no such id: myregistry.com/myapp:codeship-cache-master
Error: failed to remove images: [myregistry.com/myapp:latest myregistry.com/myapp:codeship-cache-master]
{StepStarted=step_name:"Build myapp image"}
{PullImageStarted=image_name:"myregistry.com/myapp" service_name:"myapp_build"}
{StepFinished=step_name:"Build myapp image" type:STEP_FINISHED_TYPE_ERROR}
Error: image myapp:latest not found
$ docker rmi myregistry.com/myapp:{latest,codeship-cache-master} ; jet steps --ci-branch=master
Error response from daemon: could not find image: no such id: myregistry.com/myapp:latest
Error response from daemon: could not find image: no such id: myregistry.com/myapp:codeship-cache-master
Error: failed to remove images: [myregistry.com/myapp:latest myregistry.com/myapp:codeship-cache-master]
{StepStarted=step_name:"Build myapp image"}
{PullImageStarted=image_name:"myregistry.com/myapp:codeship-cache-master" service_name:"myapp_build"}
{PullImageFinished=image_name:"myregistry.com/myapp:codeship-cache-master" service_name:"myapp_build"}
{BuildImageStarted=image_name:"myregistry.com/myapp" service_name:"myapp_build"}
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: Step 1 : FROM node:4.2.3
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: ---> 14aadd36ad0c
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: Step 2 : MAINTAINER Me
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: ---> Using cache
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: ---> 85162f600fc1
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: Successfully built 85162f600fc1
{PushImageStarted=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: The push refers to a repository [myregistry.com/myapp] (len: 1)
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: codeship-cache-master: digest: sha256:bb461ab189138c02d674bb35b50220961c6c1acef3b229cb834cabc708092f76 size: 18846
{PushImageFinished=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}
{BuildImageFinished=image_name:"myregistry.com/myapp" service_name:"myapp_build"}
{StepFinished=step_name:"Build myapp image" type:STEP_FINISHED_TYPE_SUCCESS}
$ docker rmi myregistry.com/myapp:{latest,codeship-cache-master} ; jet steps --ci-branch=master
Untagged: myregistry.com/myapp:latest
Untagged: myregistry.com/myapp:codeship-cache-master
{StepStarted=step_name:"Build myapp image"}
{PullImageStarted=image_name:"myregistry.com/myapp" service_name:"myapp_build"}
{StepFinished=step_name:"Build myapp image" type:STEP_FINISHED_TYPE_ERROR}
Error: image myapp:latest not found
$ docker rmi myregistry.com/myapp:{latest,codeship-cache-master} ; jet steps --ci-branch=master
Error response from daemon: could not find image: no such id: myregistry.com/myapp:latest
Error response from daemon: could not find image: no such id: myregistry.com/myapp:codeship-cache-master
Error: failed to remove images: [myregistry.com/myapp:latest myregistry.com/myapp:codeship-cache-master]
{StepStarted=step_name:"Build myapp image"}
{PullImageStarted=image_name:"myregistry.com/myapp:codeship-cache-master" service_name:"myapp_build"}
{PullImageFinished=image_name:"myregistry.com/myapp:codeship-cache-master" service_name:"myapp_build"}
{BuildImageStarted=image_name:"myregistry.com/myapp" service_name:"myapp_build"}
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: Step 1 : FROM node:4.2.3
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: ---> 14aadd36ad0c
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: Step 2 : MAINTAINER Me
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: ---> Using cache
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: ---> 85162f600fc1
{BuildImageStdout=image_name:"myregistry.com/myapp" service_name:"myapp_build"}: Successfully built 85162f600fc1
{PushImageStarted=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: The push refers to a repository [myregistry.com/myapp] (len: 1)
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: Image already exists
{PushImageStdout=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}: codeship-cache-master: digest: sha256:bb461ab189138c02d674bb35b50220961c6c1acef3b229cb834cabc708092f76 size: 18846
{PushImageFinished=step_name:"Build myapp image" service_name:"myapp_build" image_name:"myregistry.com/myapp"}
{BuildImageFinished=image_name:"myregistry.com/myapp" service_name:"myapp_build"}
{StepFinished=step_name:"Build myapp image" type:STEP_FINISHED_TYPE_SUCCESS}
This is legit copy paste of this happening. I just search/replaced some identifying bits and added newlines between runs.
codeship-steps.yml:
- name: Build
service: myapp_build
command: /bin/true
encrypted_dockercfg_path: dockercfg.encrypted
codeship-services.yml:
myapp_build:
build:
image: myregistry.com/myapp
dockerfile_path: docker/build/myapp/Dockerfile
cached: true
encrypted_env_file: codeship.env.encrypted
Dockerfile:
FROM node:4.2.3
MAINTAINER Me
Jet version is 1.1.3
The weirdest thing is that it only happens in one project. If I take the files in here as pasted and start in a new directory, it will NEVER happen (put it in a loop for an hour). If I dumb down my project commenting everything until it's as pasted here, the strange behaviour continues. Any idea what would cause jet to alternate like this in a seemingly random fashion?
Hi,
There seems to be an issue in the way jet handles environment variables passed via codeship-services.yml
. Given the following service config:
js-test:
build:
dockerfile: ./dockerfiles/js-test/Dockerfile
environment:
CI: 1
I expect there to be an environmental variable CI whose value is 1 in the container. But I find that the value of CI is undefined. I can only set a new env var from the Dockerfile, but not from the yml file. I've also tried using the array format, but nothing worked:
environment:
- CI=1
Can anyone help?
I trimmed down the check.rb
to only have a postgres database that it has to check, but if I take out the sleep 2
from my check.rb
script I cannot seem to connect to the database anymore. Is it really necessary to wait for 2 seconds before running the database check? This seems like an awkward thing to set though or does it function another purpose?
I seem to run into database connection problems in my Ruby on Rails projects too.
My trimmed down check.rb
file:
require 'pg'
def log(message)
puts "\e[34m#{message}\e[0m"
end
sleep 2 # if I remove this line, the database connection will not be setup
log 'Checking PostgreSQL server...'
pg = PG.connect(
host: ENV['POSTGRES_HOST'],
dbname: ENV['POSTGRES_DB'],
user: ENV['POSTGRES_USER']
)
log pg.exec('SELECT version();').first['version']
Hi there, this is the best place I could find for this issue and I apologize if it's already been addressed/folded into upcoming changes.
I am attempting to do local jet runs on my Win7 dev machine with Docker Toolbox installed and confirmed to be working. But the command line utility will intermittently hang and be unresponsive to ctrl-c when I call it. Something as simple as jet --version
will hang. I have successfully run jet steps
a handful of times but now it immediately hangs virtually every time.
I understand docker and related tools aren't exactly first-class citizens in Windows < 10, but it frustrates me as I've had it work perfectly a few times. Are there any configuration steps that might fix this issue, or should I look into running a different environment?
Note: I've also tried the dynamically linked binary provided in the install instructions.
So I'm having the following use case:
app_test:
image: myapp
links:
- selenium
- selenium_firefox
selenium:
image: selenium/hub
selenium_firefox:
image: selenium/node-firefox
links:
- selenium:hub
- app_test
So when using the official Selenium images you need to create a container for the "hub" and then create containers for each node and link them to the hub. The link direction has to be node->hub. Now my app needs to be linked to the selenium hub to be able to run selenium tests. It does not need to know about the selenium node (selenium_firefox) but it is linked anyway because links govern which containers will be started.... However, the selenium node does need to know about my app container in order for it to run tests against it. I'm stuck now because with this configuration jet complains:
services file error: Circular loop between services app_test and selenium_firefox
Unless I'm missing something I understand that links are used as hints to tell jets which services have to be launched along with each service. Apparently this doesn't work for all cases. Also, a potential bug: if I give app_test an alias in the links array (app_test:app for example) then the circular loop is not detected and jet happily runs and ends up in an infinite loop :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.