Skip to content

Commit

Permalink
Merge branch 'master' into meat-go-deps-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
emdantrim authored Feb 28, 2018
2 parents 8921efc + 64df403 commit 76e2d84
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,22 @@ To add a new dependency, do the following:

## Release process

The parts of the release process that haven't yet been automated look like this:

- [ ] review the diff since last release for silliness
- [ ] decide what the version bump should be
- [ ] update [`./CHANGELOG.md`](./CHANGELOG.md) (in a release prep branch)
- [ ] tag accordingly after merge
- [ ] update github release tag with relevant section from [`./CHANGELOG.md`](./CHANGELOG.md)
- [ ] attach binaries to github release tag
Since we want to easily keep track of worker changes, we often associate them with a version number.
To find out the current version, check the [changelog](https://github.com/travis-ci/worker/blob/master/CHANGELOG.md) or run `travis-worker --version`.
We typically use [semantic versioning](https://semver.org/) to determine how to increase this number.

Once you've decided what the next version number should be, update the [changelog](https://github.com/travis-ci/worker/blob/master/CHANGELOG.md) making sure you include all relevant changes that happened since the previous version was tagged. You can see these by running `git diff vX.X.X...HEAD`, where `v.X.X.X` is the name of the previous version.

Once the changelog has been updated and merged to `master`, the merge commit needs to be signed and manually tagged with the version number. To do this, run:

```
$ git tag --sign -a vX.X.X -m "Worker version vX.X.X"
$ git push origin vX.X.X
```

The Travis build corresponding to this push should build and upload a worker image with the new tag to [Dockerhub](https://hub.docker.com/r/travisci/worker/tags/).

The next step is to create a new [Github release tag](https://github.com/travis-ci/worker/releases/new) with the appropriate information from the changelog.

## License and Copyright Information

Expand Down
15 changes: 15 additions & 0 deletions backend/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"bytes"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"path/filepath"
Expand Down Expand Up @@ -387,6 +388,20 @@ func (p *dockerProvider) Start(ctx gocontext.Context, startAttributes *StartAttr
labels["travis.job_id"] = strconv.FormatUint(jid, 10)
}

ipv4, err := ioutil.ReadFile("/var/tmp/travis-run.d/instance-ipv4")
if err != nil {
logger.WithField("err", err).Error("couldn't read instance IP from /var/tmp/travis-run.d/instance-ipv4")
} else {
labels["travis.ipv4"] = string(ipv4)
}

iid, err := ioutil.ReadFile("/var/tmp/travis-run.d/instance-id")
if err != nil {
logger.WithField("err", err).Error("couldn't read instance ID from /var/tmp/travis-run.d/instance-id")
} else {
labels["travis.instance_id"] = string(iid)
}

dockerConfig := &dockercontainer.Config{
Cmd: p.runCmd,
Image: imageID,
Expand Down
6 changes: 5 additions & 1 deletion script/http-job-test
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ main() {

docker exec \
--user postgres \
job-board-postgres bash -c 'while ! psql -l; do sleep 1; done'
job-board-postgres bash -c 'while ! pg_isready; do sleep 1; done'

# despite pg_isready reporting the server as up, we still have to wait a bit
# for createdb to be able to successfully connect
sleep 1

docker exec \
--user postgres \
Expand Down

0 comments on commit 76e2d84

Please sign in to comment.