mirror of
https://github.com/woodchen-ink/docker-firefox.git
synced 2025-07-18 13:52:02 +08:00
Removed leftover files from old CI.
This commit is contained in:
parent
ddc77a277f
commit
e3322f7d93
14
.travis.yml
14
.travis.yml
@ -1,14 +0,0 @@
|
||||
#
|
||||
# Travis CI recipe to build docker image.
|
||||
#
|
||||
|
||||
sudo: required
|
||||
|
||||
language: generic
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
script:
|
||||
- echo "Starting build of Docker image..."
|
||||
- docker build --no-cache --pull -t $TRAVIS_REPO_SLUG:$TRAVIS_JOB_ID .
|
@ -1,39 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Post push hook for Docker Automated Build.
|
||||
#
|
||||
# This hook adds the 'latest' tag to the image.
|
||||
#
|
||||
|
||||
set -e # Exit immediately if a command exits with a non-zero status.
|
||||
set -u # Treat unset variables as an error.
|
||||
|
||||
source custom_hook_env
|
||||
|
||||
echo "Environment variables:
|
||||
IMAGE_NAME=$IMAGE_NAME
|
||||
DOCKER_REPO=$DOCKER_REPO
|
||||
DOCKER_TAG=$DOCKER_TAG
|
||||
SOURCE_BRANCH=$SOURCE_BRANCH
|
||||
IMAGE_VERSION=$IMAGE_VERSION
|
||||
"
|
||||
|
||||
if [[ "$DOCKER_TAG" =~ v[0-9]+\.[0-9]+\.[0-9]+-alpha[0-9]+$ ]]; then
|
||||
DOCKER_NEWTAG="$(echo "$DOCKER_TAG" | sed 's/-alpha[0-9]\+$/-alpha/')"
|
||||
elif [[ "$DOCKER_TAG" =~ v[0-9]+\.[0-9]+\.[0-9]+-beta[0-9]+$ ]]; then
|
||||
DOCKER_NEWTAG="$(echo "$DOCKER_TAG" | sed 's/-beta[0-9]\+$/-beta/')"
|
||||
elif [[ "$DOCKER_TAG" =~ v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$ ]]; then
|
||||
DOCKER_NEWTAG="$(echo "$DOCKER_TAG" | sed 's/-rc[0-9]\+$/-rc/')"
|
||||
elif [[ "$DOCKER_TAG" =~ v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
DOCKER_NEWTAG="latest"
|
||||
else
|
||||
echo "ERROR: Invalid docker tag."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Adding tag '$DOCKER_NEWTAG' to image..."
|
||||
docker tag $IMAGE_NAME ${DOCKER_REPO}:$DOCKER_NEWTAG
|
||||
echo "Pushing image..."
|
||||
docker push ${DOCKER_REPO}:$DOCKER_NEWTAG
|
||||
|
||||
echo "post_push hook terminated successfully."
|
@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Pre build hook for Docker Automated Build.
|
||||
#
|
||||
# This hooks modifies the Dockerfile by inserting the image version in the
|
||||
# related label.
|
||||
#
|
||||
|
||||
set -e # Exit immediately if a command exits with a non-zero status.
|
||||
set -u # Treat unset variables as an error.
|
||||
|
||||
# Make sure the DOCKER_TAG has a supported format like:
|
||||
# v1.0.0
|
||||
# v0.1.0-beta1
|
||||
# v2.0.0-rc2
|
||||
if [[ ! "$DOCKER_TAG" =~ ^v[0-9\.]+(-(alpha|beta|rc)[0-9]+)?$ ]]; then
|
||||
echo "Unsupported DOCKER_TAG: $DOCKER_TAG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# The version to use is the same has the DOCKER_TAG, minus the initial 'v'.
|
||||
IMAGE_VERSION="${DOCKER_TAG:1}"
|
||||
|
||||
# Export our custom variables.
|
||||
echo "IMAGE_VERSION=\"$IMAGE_VERSION\"" >> custom_hook_env
|
||||
|
||||
echo "Environment variables:
|
||||
IMAGE_NAME=$IMAGE_NAME
|
||||
DOCKER_REPO=$DOCKER_REPO
|
||||
DOCKER_TAG=$DOCKER_TAG
|
||||
SOURCE_BRANCH=$SOURCE_BRANCH
|
||||
IMAGE_VERSION=$IMAGE_VERSION
|
||||
"
|
||||
|
||||
echo "Inserting image version in Dockerfile..."
|
||||
sed -i "s/org.label-schema.version=\"unknown\"/org.label-schema.version=\"$IMAGE_VERSION\"/" Dockerfile
|
||||
|
||||
echo "pre_build hook terminated successfully."
|
Loading…
x
Reference in New Issue
Block a user