Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 2bcc0af

Browse files
authoredOct 22, 2020
chore: run docker rc release separately (#3342)
When we publish an rc to npm, sometimes the release isn't available by the time we try to publish an rc to docker hub. Change the docker publish to be a separate job to give it a bit of time before running so npm has a chance to propagate the rc but also so we can re-run if it's too fast.
1 parent 3e7e222 commit 2bcc0af

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
 

‎.travis.yml

+14
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ branches:
1111
stages:
1212
- test
1313
- release-rc
14+
- release-docker
1415
- test-external
1516

1617
node_js:
@@ -252,6 +253,19 @@ jobs:
252253
# only run if the last commit was not part of a release
253254
- if [[ ! `git log -n 1 -q` =~ publish ]]; then npm run release:rc ; fi
254255

256+
- stage: release-docker
257+
# only run on changes to master
258+
if: branch = master AND type = push AND fork = false
259+
name: release docker
260+
script:
261+
# travis does not fetch the whole repo history, but we need that to work out the
262+
# ref count to publish canary releases properly
263+
- git fetch --unshallow
264+
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
265+
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
266+
# only run if the last commit was not part of a release
267+
- if [[ ! `git log -n 1 -q` =~ publish ]]; then npm run docker:rc ; fi
268+
255269
- stage: test-external
256270
# only run on changes to master
257271
if: branch = master AND type = push AND fork = false

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@
4444
"release:post:remove-hoisted-modules": "json -I -f ./lerna.json -e \"delete this.command.bootstrap.nohoist\"",
4545
"release:post:remove-examples": "json -I -f ./lerna.json -e \"this.packages = this.packages.filter(p => !p.includes('examples'))\"",
4646
"release:post:revert-ignore-changes-to-lerna-config": "git update-index --no-assume-unchanged ./lerna.json",
47-
"release:rc": "run-s release:pre:* release:canary docker:rc:* release:post:*",
47+
"release:rc": "run-s release:pre:* release:canary release:post:*",
4848
"release:canary": "lerna publish --canary --preid rc --dist-tag next --force-publish --yes",
49+
"docker:rc": "run-s docker:rc:*",
4950
"docker:rc:build": "docker build . --no-cache --tag js-ipfs:next --file ./Dockerfile.next",
5051
"docker:rc:tag-next": "docker tag js-ipfs:next docker.io/ipfs/js-ipfs:next",
5152
"docker:rc:tag-rc": "docker tag js-ipfs:next docker.io/ipfs/js-ipfs:v`npm show ipfs@next version -q`",

0 commit comments

Comments
 (0)
This repository has been archived.