Skip to content

Commit

Permalink
Merge pull request #3148 from postmanlabs/feature/v6-drop-deprecated-…
Browse files Browse the repository at this point in the history
…docker

Dropped support for deprecated docker images
  • Loading branch information
codenirvana committed Sep 14, 2023
2 parents 4ad1955 + fb2a995 commit 6ede0ca
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 225 deletions.
13 changes: 1 addition & 12 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ software development. Visit
<a href="https://www.docker.com/whatisdocker" target="_blank">https://www.docker.com/whatisdocker</a> to read more about
how docker can drastically simplify development and deployment.

## There are four available Docker images for Newman
## There are two available Docker images for Newman
### postman/newman:alpine (lightweight):
* <a href="https://hub.docker.com/r/postman/newman/">DockerHub</a>
* <a href="https://github.com/postmanlabs/newman/tree/develop/docker/images/alpine">Documentation</a>
Expand All @@ -24,17 +24,6 @@ how docker can drastically simplify development and deployment.
* <a href="https://hub.docker.com/r/postman/newman/">DockerHub</a>
* <a href="https://github.com/postmanlabs/newman/tree/develop/docker/images/ubuntu">Documentation</a>

### postman/newman_alpine33 (lightweight, deprecated):
* <a href="https://hub.docker.com/r/postman/newman_alpine33/">DockerHub</a>
* <a href="https://github.com/postmanlabs/newman/tree/develop/docker/images/alpine33">Documentation</a>

### postman/newman_ubuntu1404 (deprecated):
* <a href="https://hub.docker.com/r/postman/newman_ubuntu1404/">DockerHub</a>
* <a href="https://github.com/postmanlabs/newman/tree/develop/docker/images/ubuntu1404">Documentation</a>

### Note:
The Docker images postman/newman_alpine33 and postman/newman_ubuntu1404 for Newman are deprecated. It is advised to use [postman/newman](https://hub.docker.com/r/postman/newman/) instead.

## Using the docker image

The docker image for Newman is available for download from our docker hub. You must have Docker installed in your
Expand Down
2 changes: 1 addition & 1 deletion docker/images/alpine/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# newman:alpine

This image runs newman on node v10 on Alpine
This image runs newman on node v16 on Alpine

Build the image:

Expand Down
48 changes: 0 additions & 48 deletions docker/images/alpine33/Dockerfile

This file was deleted.

39 changes: 0 additions & 39 deletions docker/images/alpine33/README.md

This file was deleted.

35 changes: 21 additions & 14 deletions docker/images/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
FROM ubuntu:18.04
FROM ubuntu:22.04
LABEL maintainer="Postman Labs <help@postman.com>"

ARG NODE_VERSION=10
ARG NODE_MAJOR=16
ARG NEWMAN_VERSION

# Bail out early if NODE_VERSION is not provided
# Bail out early if NEWMAN_VERSION is not provided
RUN if [ ! $(echo $NEWMAN_VERSION | grep -oE "^[0-9]+\.[0-9]+\.[0-9]+$") ]; then \
echo "\033[0;31mA valid semver Newman version is required in the NEWMAN_VERSION build-arg\033[0m"; \
exit 1; \
fi

# Install node
ADD https://deb.nodesource.com/setup_$NODE_VERSION.x /opt/install_node.sh

RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y gnupg && \
bash /opt/install_node.sh && \
apt-get install -y nodejs && \
npm install -g newman@${NEWMAN_VERSION} && \
rm /opt/install_node.sh && \
apt-get purge -y gnupg;
RUN \
# Download and import the Nodesource GPG key
apt-get update; \
apt-get install -y ca-certificates curl gnupg; \
mkdir -p /etc/apt/keyrings; \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \

# Create deb repository
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \
| tee /etc/apt/sources.list.d/nodesource.list; \

# Run Update and Install
apt-get update; \
apt-get install nodejs -y; \

# Install Newman globally
npm install --global newman@${NEWMAN_VERSION};

# Set environment variables
ENV LC_ALL="en_US.UTF-8" LANG="en_US.UTF-8" LANGUAGE="en_US.UTF-8"
Expand Down
2 changes: 1 addition & 1 deletion docker/images/ubuntu/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# newman:ubuntu

This image runs newman on node v10 on Ubuntu 18.04
This image runs newman on node v16 on Ubuntu 22.04

Build the image,

Expand Down
40 changes: 0 additions & 40 deletions docker/images/ubuntu1404/Dockerfile

This file was deleted.

39 changes: 0 additions & 39 deletions docker/images/ubuntu1404/README.md

This file was deleted.

52 changes: 21 additions & 31 deletions npm/postpublish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,40 +37,30 @@ function build_docker_image {

# Tag
if [[ ${GIT_BRANCH} == "master" ]]; then
if [[ ${TAG} == "ubuntu1404" || ${TAG} == "alpine33" ]]; then
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}_${TAG}:latest;
docker push ${DOCKER_REPO}_${TAG}:latest;
else
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${TAG};
docker push ${DOCKER_REPO}:${TAG};

if [[ ${TAG} == ${LATEST} ]]; then
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:latest;
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${VERSION};
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${MINOR};
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${MAJOR};

docker push ${DOCKER_REPO}:latest;
docker push ${DOCKER_REPO}:${VERSION};
docker push ${DOCKER_REPO}:${MINOR};
docker push ${DOCKER_REPO}:${MAJOR};
fi
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${TAG};
docker push ${DOCKER_REPO}:${TAG};

if [[ ${TAG} == ${LATEST} ]]; then
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:latest;
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${VERSION};
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${MINOR};
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${MAJOR};

docker push ${DOCKER_REPO}:latest;
docker push ${DOCKER_REPO}:${VERSION};
docker push ${DOCKER_REPO}:${MINOR};
docker push ${DOCKER_REPO}:${MAJOR};
fi
fi

if [[ ${TAG} == "ubuntu1404" || ${TAG} == "alpine33" ]]; then
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}_${TAG}:${VERSION};
docker push ${DOCKER_REPO}_${TAG}:${VERSION};
else
# Push
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${VERSION}-${TAG};
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${MINOR}-${TAG};
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${MAJOR}-${TAG};

docker push ${DOCKER_REPO}:${VERSION}-${TAG};
docker push ${DOCKER_REPO}:${MINOR}-${TAG};
docker push ${DOCKER_REPO}:${MAJOR}-${TAG};
fi
# Push
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${VERSION}-${TAG};
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${MINOR}-${TAG};
docker tag ${DOCKER_REPO}:${VERSION}-${TAG} ${DOCKER_REPO}:${MAJOR}-${TAG};

docker push ${DOCKER_REPO}:${VERSION}-${TAG};
docker push ${DOCKER_REPO}:${MINOR}-${TAG};
docker push ${DOCKER_REPO}:${MAJOR}-${TAG};
}

for image in ${IMAGES_BASE_PATH}/*; do
Expand Down

0 comments on commit 6ede0ca

Please sign in to comment.