Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Commit

Permalink
Merge branch 'release/v3.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
elssar committed Nov 2, 2016
2 parents 0ce6cc9 + 111425e commit 6e79dab
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 8 deletions.
2 changes: 1 addition & 1 deletion images/alpine33/Dockerfile
Expand Up @@ -13,7 +13,7 @@ ENV LANGUAGE en_US.UTF-8
RUN apk add --update nodejs=${NODE_VERSION}-r0;

# Set newman version
ENV NEWMAN_VERSION 3.1.2
ENV NEWMAN_VERSION 3.2.0

# Install newman
RUN npm install -g newman@${NEWMAN_VERSION};
Expand Down
4 changes: 2 additions & 2 deletions images/alpine33/README.md
@@ -1,6 +1,6 @@
# newman_alpine33

This image runs newman 3.1.2 on node 4.3.0 on Alpine 3.3
This image runs newman 3.2.0 on node 4.3.0 on Alpine 3.3

Build the image,

Expand All @@ -11,7 +11,7 @@ docker build -t postman/newman_alpine33 .
Or get it from [docker hub](https://registry.hub.docker.com/u/postman/newman_alpine33/)

```terminal
docker pull postman/newman_alpine33:3.1.2
docker pull postman/newman_alpine33:3.2.0
```

then run it
Expand Down
2 changes: 1 addition & 1 deletion images/ubuntu1404/Dockerfile
Expand Up @@ -19,7 +19,7 @@ RUN npm install -g n;
RUN n ${NODE_VERSION};

# Set newman version
ENV NEWMAN_VERSION 3.1.2
ENV NEWMAN_VERSION 3.2.0

# Install newman
RUN npm install -g newman@${NEWMAN_VERSION};
Expand Down
4 changes: 2 additions & 2 deletions images/ubuntu1404/README.md
@@ -1,6 +1,6 @@
# newman_ubuntu1404

This image runs newman 3.1.2 on node 4.3.0 on Ubuntu 14.04.2
This image runs newman 3.2.0 on node 4.3.0 on Ubuntu 14.04.2

Build the image,

Expand All @@ -11,7 +11,7 @@ docker build -t postman/newman_ubuntu1404 .
Or get it from [docker hub](https://registry.hub.docker.com/u/postman/newman_ubuntu1404/)

```terminal
docker pull postman/newman_ubuntu1404:3.1.2
docker pull postman/newman_ubuntu1404:3.2.0
```

then run it
Expand Down
3 changes: 2 additions & 1 deletion package.json
@@ -1,8 +1,9 @@
{
"name": "newman-docker",
"version": "3.1.2",
"version": "3.2.0",
"description": "This repository contains the Dockerfiles and tests for the Newman Docker images.",
"scripts": {
"update": "./scripts/update/update.sh",
"docker-build": "./scripts/docker/docker-build.sh",
"docker-test": "./scripts/docker/docker-test.sh",
"test": "./scripts/test/test.sh",
Expand Down
8 changes: 7 additions & 1 deletion scripts/docker/docker-build.sh
Expand Up @@ -3,11 +3,17 @@
set -e;

IMAGES_BASE_PATH="./images";
CURRENT_BRANCH=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')

function build_docker_image {
TAG=$(grep -oP "(?<=ENV\ NEWMAN_VERSION\ ).+" ${1}/Dockerfile);
BASENAME=$(basename $1);
docker build -t postman/newman_${BASENAME}:${TAG} ${1};

if [ $CURRENT_BRANCH = "master" ]; then
docker build -t postman/newman_${BASENAME}:${TAG} -t postman/newman_${BASENAME}:latest ${1};
else
docker build -t postman/newman_${BASENAME}:${TAG} ${1};
fi
}

if [ -z "$1" ]; then
Expand Down
23 changes: 23 additions & 0 deletions scripts/update/update.sh
@@ -0,0 +1,23 @@
#!/bin/bash

# A simple script to automagically bump the newman-docker image version to the latest counterpart from npmjs.org

# Stop on first error
set -e;

echo "Determining the latest version of Newman from npmjs.org...";

CURRENT_VERSION=$npm_config_package_version;
LATEST_VERSION=$(npm show newman version);

if [ -z $CURRENT_VERSION ]; then
CURRENT_VERSION=$(grep "\"version\":\ " package.json | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" | cat);
fi

if [ $CURRENT_VERSION = $LATEST_VERSION ]; then
echo "The current version is the latest";
exit 0;
fi

git grep -l $CURRENT_VERSION | xargs sed -i 's/$CURRENT_VERSION/$LATEST_VERSION/g' images/**/*.*;
echo "Bumped newman-docker version to v$LATEST_VERSION";

0 comments on commit 6e79dab

Please sign in to comment.