Skip to content

yukihiko-shinoda/dockerfile-deploy-wordpress-plugin

Repository files navigation

Test Docker Cloud Automated build Docker Cloud Build Status Docker Image Size (latest semver)

Quick reference

What is Deploy WordPress Plugin?

This is deployment job for WordPress Plugin from public Git repository to SubVersion on WordPress.org.

requirement

  • Tagging revision on Git is done before deploy into WordPress.org
  • Tag name of revision on source Git repository to deploy is the same as version number of plugin’s main PHP file on tagged revision of source Git repository

out of scope

  • Deploying old version than latest version
  • Deploying Assets (Even if Git repository includes assets, this project will deploy the revision content as it is under trunk and tags of SubVersion repository on WordPress.org.)

excluding strategy

The process executes rsync from Git working tree to SubVersion working tree with .rsync-filter.

default behavior

rsync will read default .rsync-filter file.

customizing behavior

If .rsync-filter file is exist on the root of Git working tree, rsync will read it. The most primitive how to write it is to list up files and directories you want to exclude. For more details, following contents will be helpful.

How to use this image

This image is depend on futureys/ansible-workspace-deploy-wordpress-plugin. It will be easier to understand if you look at the Docker Compose files in the GitHub code.

https://github.com/yukihiko-shinoda/dockerfile-deploy-wordpress-plugin

... via docker-compose

1. Download project files

Clone or download project files from GitHub.

git clone https://github.com/yukihiko-shinoda/dockerfile-deploy-wordpress-plugin.git

2. Set environment variable

If you prefer, there is template to set environment variables, Copy .env.dist to .env, then open by editor and edit variable definitions.

ref: Environment variables in Compose | Docker Documentation

3. Dry run

By running SubVersion container for mock in local. Enter following command:

docker-compose -f docker-compose.yml -f docker-compose.staging.yml up -d && docker logs -f deploy

4. Check dry run result

When process succeed to finish, check result by checking out from mock:

svn checkout svn://(your-docker-host-name)/project-in-svn
cd project-in-svn
svn log HEAD:1

5. Shutdown containers once

Once you have checked that it works as expected, shutdown containers once.

docker-compose -f docker-compose.yml -f docker-compose.staging.yml down

6. Run as production

docker-compose -f docker-compose.yml up

7. Check on WordPress.org

Check on WordPress.org that it has been deployed successfully.

WordPress Plugins | WordPress.org

8. Shutdown containers

After checking that the deployment was succeed, shutdown the container.

docker-compose -f docker-compose.yml down

Environment Variables

GIT_REPOSITORY_URL

The source Git repository URL for public repository. Only either of GIT_REPOSITORY_URL or GIT_PATH_CHECKED_OUT can define.

GIT_PATH_CHECKED_OUT

The source GIT_PATH_CHECKED_OUT. This is intended to mount the directory where checked out the private repository. Only either of GIT_REPOSITORY_URL or GIT_PATH_CHECKED_OUT can define.

SVN_REPOSITORY_URL

The destination SubVersion repository URL.

Ex: https://plugins.svn.wordpress.org/????

SVN_USER_NAME

User name of SubVersion on WordPress.org.

Your account for SVN will be the same username (not the email) of the account you used when you submitted the plugin. This is the user ID you use for the WordPress forums as well.

SVN_USER_PASSWORD

User password of SubVersion on WordPress.org.

If you need to reset your password, go to login.wordpress.org

DEPLOY_VERSION

The tag name of revision on source Git repository to deploy. This string also has to be the same as the version number of plugin’s main PHP file on tagged revision of source Git repository.

SHOW_ALL_LOG

By default, this image hide logs about steps using secret for example when commit. When debug, you can check log by setting this true.

About

Dockerfile for deploy WordPress plugin from Git repository.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •