diff --git a/.travis.yml b/.travis.yml index 5cd2dcddc..8120c83fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,6 @@ script: - "./run-tests.sh" deploy: provider: script - script: bash docker_push + script: bash docker_push.sh on: - branch: travis_docker_testing + branch: main diff --git a/docker/prod/deploy.sh b/docker/prod/deploy.sh index 2e8728180..3c12df204 100755 --- a/docker/prod/deploy.sh +++ b/docker/prod/deploy.sh @@ -24,35 +24,39 @@ cd docker/prod || exit # Changing the docker-compose prod sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../prod/docker-compose.yml sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../../ansible/templates/docker-compose.yml +sed -i "s/dessalines\/lemmy:v.*/dessalines\/lemmy:$new_tag/" ../travis/docker_push.sh git add ../prod/docker-compose.yml git add ../../ansible/templates/docker-compose.yml +git add ../travis/docker_push.sh # The commit git commit -m"Version $new_tag" git tag $new_tag -export COMPOSE_DOCKER_CLI_BUILD=1 -export DOCKER_BUILDKIT=1 +# Now doing the building on travis, but leave this in for when you need to do an arm build -# Rebuilding docker -if [ $third_semver -eq 0 ]; then - # TODO get linux/arm/v7 build working - # Build for Raspberry Pi / other archs too - docker buildx build --platform linux/amd64,linux/arm64 ../../ \ - --file Dockerfile \ - --tag dessalines/lemmy:$new_tag \ - --push -else - docker buildx build --platform linux/amd64 ../../ \ - --file Dockerfile \ - --tag dessalines/lemmy:$new_tag \ - --push -fi +# export COMPOSE_DOCKER_CLI_BUILD=1 +# export DOCKER_BUILDKIT=1 + +# # Rebuilding docker +# if [ $third_semver -eq 0 ]; then +# # TODO get linux/arm/v7 build working +# # Build for Raspberry Pi / other archs too +# docker buildx build --platform linux/amd64,linux/arm64 ../../ \ +# --file Dockerfile \ +# --tag dessalines/lemmy:$new_tag \ +# --push +# else +# docker buildx build --platform linux/amd64 ../../ \ +# --file Dockerfile \ +# --tag dessalines/lemmy:$new_tag \ +# --push +# fi # Push git push origin $new_tag git push # Pushing to any ansible deploys -cd ../../../lemmy-ansible || exit -ansible-playbook -i prod playbooks/site.yml --vault-password-file vault_pass +# cd ../../../lemmy-ansible || exit +# ansible-playbook -i prod playbooks/site.yml --vault-password-file vault_pass diff --git a/docker/travis/docker_push b/docker/travis/docker_push deleted file mode 100644 index 34979efde..000000000 --- a/docker/travis/docker_push +++ /dev/null @@ -1,2 +0,0 @@ -echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin -docker push dessalines/lemmy:travis diff --git a/docker/travis/docker_push.sh b/docker/travis/docker_push.sh new file mode 100644 index 000000000..bd6dfca65 --- /dev/null +++ b/docker/travis/docker_push.sh @@ -0,0 +1,5 @@ +#!/bin/sh +echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin +docker tag dessalines/lemmy:travis \ + dessalines/lemmy:v0.7.28 +docker push dessalines/lemmy:v0.7.28