Coder Social home page Coder Social logo

yukihiko-shinoda / dockerfile-deploy-wordpress-plugin Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 194 KB

Dockerfile for deploy WordPress plugin from Git repository.

Dockerfile 4.69% Shell 2.54% Python 85.78% PHP 6.54% Jinja 0.45%
wordpress-plugin docker wp-plugin deploy deployment deployment-automation ansible dockerfile

dockerfile-deploy-wordpress-plugin's Introduction

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.

dockerfile-deploy-wordpress-plugin's People

Contributors

yukihiko-shinoda avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.