Jose Diaz-Gonzalez
db239debf1
feat: expose git-from-archive and git-from-image plugin triggers
...
This will allow other plugins to create apps on the fly by specifying either an archive url or a docker image.
Closes #4778
2021-09-22 12:32:17 -04:00
Jose Diaz-Gonzalez
bc410b4111
fix: recursively sync submodules
...
Closes #4624
2021-08-06 11:40:28 -04:00
Jose Diaz-Gonzalez
623aa737e0
fix: set correct variable for git repo root
2021-07-12 00:01:01 -04:00
Jose Diaz-Gonzalez
97b0aa3eb8
fix: ensure repository is bare when calling git:sync
...
Closes #4636
2021-07-11 21:26:14 -04:00
Jose Diaz-Gonzalez
b16e5516bf
fix: properly quote traps with variables
2021-06-09 01:17:48 -04:00
Milan Vit
ca6ac610a2
Fix alternate-tags content & escaping
2021-04-22 13:23:33 +09:00
Jose Diaz-Gonzalez
8660d58eb0
fix: inject alternate label when building from an image
...
This label is otherwise missing, causing tooling that might want to know about it's pre-existing labels - specifically, docker-image-labeler - to fail to run as expected.
2021-04-16 12:28:56 -04:00
arturs
46c4a93468
chore(plugins): remove unnecessary command
2021-04-14 22:00:28 +03:00
arturs
84daf1ae52
fix(plugins): add touch netrc and remove netrc in git auth fn
2021-04-14 21:41:33 +03:00
Jose Diaz-Gonzalez
4cd064f76c
chore: run shfmt against file
2021-03-12 02:53:28 -05:00
arturs
f9be3dd974
clean up remove clone folder fn
2021-03-12 09:24:41 +02:00
arturs
888f45254a
fix shfmt
2021-03-11 17:59:46 +02:00
arturs
8d11789566
add tests and prompt to unlock
2021-03-11 17:41:39 +02:00
arturs
5ae531ca25
remove unnecessary code
2021-03-10 22:58:40 +02:00
arturs
5debadfde1
remove redundant code
2021-03-10 22:10:44 +02:00
arturs
642dc83702
fix lint issue
2021-03-10 20:31:44 +02:00
arturs
99bc51f106
fix unlock command
2021-03-10 19:29:23 +02:00
arturs
741ea68cac
fix formatting according to shfmt
2021-03-07 15:37:40 +02:00
arturs
58dca68fb4
fix has_tty if condition
2021-03-07 15:29:07 +02:00
arturs
b1db1e3e6f
add git:unlock functionality
2021-03-07 12:28:03 +02:00
Jose Diaz-Gonzalez
5c1a1baf08
feat: implement git:from-archive
...
The previous tar support lacked the ability to track changes between tarball deploys. Critically, it also failed to be handled correctly when there was _also_ a git deployment done on the app, resulting in odd deployment states depending on the angles of the moon and the sun in the sky.
Rather than try to "fix" this through some hokey mechanism, importing the tar file contents into the git repository is preferred, as then the user can refer to the repository for commit history.
Additionally, we add support for non-tar files (tar.gz and zip), enabling deployments from systems that do not create tar files, such as Github (their tarball url is a tar.gz file).
Finally, this deprecates the tar plugin, and sets it to be removed in the next minor release (in addition to the tags plugin).
Closes #3458
Closes #4207
2021-03-01 08:13:51 -05:00
Jose Diaz-Gonzalez
0a31f6fe3a
feat: add git:from-image support
...
The new command superscedes the previous tags plugin, and integrates docker image deployment with the general build process.
While `docker image load` is not supported, this otherwise completely handles all previous workflows supported by the `tags:deploy` command, while doing so in a much easier to use interface.
Closes #4296
2021-03-01 02:26:58 -05:00
Jose Diaz-Gonzalez
5804cd11bc
chore: standardize popd calls
2021-03-01 00:33:06 -05:00
Jose Diaz-Gonzalez
7a710005a1
feat: implement git:auth command
...
Refs #4364
2021-02-28 04:47:37 -05:00
Jose Diaz-Gonzalez
64b1a54cad
fix: switch to using GIT_DIR environment variable to fix Centos 7 support
...
Closes #4429
2021-02-25 06:04:37 -05:00
Jose Diaz-Gonzalez
6b90dc70b1
fix: properly handle directory change when cleaning .git directory
...
Closes #4434
2021-02-25 02:29:36 -05:00
Jose Diaz-Gonzalez
3ae9feba8f
fix: keep the git directory for worktree-enabled installations
...
Git worktrees do not include the full .git directory - only a pointer to the actual directory - when keep-git-dir is set to true, which is incorrect for built containers. This change special-cases that combination, allowing folks on newer git installs to actually keep the .git directory during the build process.
Closes #4415
2021-02-20 17:33:24 -05:00
Jose Diaz-Gonzalez
882889a962
tests: fix shfmt
2021-02-13 02:14:50 -05:00
Jose Diaz-Gonzalez
02a8409114
tests: fix shfmt issues
2021-02-13 02:05:44 -05:00
Jose Diaz-Gonzalez
cca507da6a
refactor: avoid pushd/popd to enable commands to pass from root-enabled directories
2021-01-17 19:40:33 -05:00
Jose Diaz-Gonzalez
d58fe853d6
fix: allow updating head
2021-01-17 19:34:07 -05:00
Jose Diaz-Gonzalez
03dc90b4fd
chore: re-add output redirection
2021-01-17 19:33:36 -05:00
Jose Diaz-Gonzalez
2a4918c7ce
fix: run check-ref-format in the correct directory
2021-01-17 19:23:40 -05:00
Jose Diaz-Gonzalez
7bb130edb7
refactor: use flag instead of environment variable
2021-01-17 19:13:30 -05:00
Jose Diaz-Gonzalez
3af1342a9b
fix: expand git-ref to the full commit sha
...
If using a branch, git commands that interact with worktrees may fail for newer versions of git.
2021-01-17 17:29:21 -05:00
Jose Diaz-Gonzalez
d16ff7fa12
fix: properly report last-updated
2021-01-17 17:19:14 -05:00
Jose Diaz-Gonzalez
d5dbd456ea
chore: quiet down git init
...
The command is louder when running on newer versions of git, and the output isn't useful to end users.
2021-01-17 17:07:10 -05:00
Jose Diaz-Gonzalez
3f25514e1a
refactor: combine both clone and sync commands
...
Using a single command will allow users to not have to worry about the workflow they use to setup or update a given app.
2021-01-17 17:00:33 -05:00
Jose Diaz-Gonzalez
97b33a9138
feat: fix: use correct branch for ref updating
2021-01-17 17:00:33 -05:00
Jose Diaz-Gonzalez
f73c927512
fix: do not allow fetch on fresh apps
2021-01-17 17:00:33 -05:00
Jose Diaz-Gonzalez
827dbbc740
fix: delete the deploy branch if its a ref and not tag
2021-01-17 17:00:33 -05:00
Jose Diaz-Gonzalez
dbd48356f5
refactor: properly handle commits and branches
...
- if it is a commit, we must clone and checkout. `clone --branch` only works for tags and branches
- set the branch as the deploy-branch if detected
2021-01-17 17:00:33 -05:00
Jose Diaz-Gonzalez
6dc55624bd
chore: change message
2021-01-17 17:00:33 -05:00
Jose Diaz-Gonzalez
5e645e1489
fix: use correct method to detect if a repo is empty
2021-01-17 17:00:33 -05:00
Jose Diaz-Gonzalez
87a786fec5
fix: get arguments correctly
2021-01-17 17:00:33 -05:00
Jose Diaz-Gonzalez
c9fc203596
fix: properly parse arguments
2021-01-17 17:00:33 -05:00
Jose Diaz-Gonzalez
f87525d8cf
refactor: move temp directory to git data directory
2021-01-17 17:00:33 -05:00
Jose Diaz-Gonzalez
31332a5061
fix: move fn-git-create-hook to internal-functions
...
Its unused elsewhere.
2021-01-17 17:00:33 -05:00
Jose Diaz-Gonzalez
c80fcf7b8e
feat: add support for cloning/syncing from a remote repository
...
This makes it a bit easier for external projects to implement deploy webhooks by exposing the ability to sync from a git repository/sha.
2021-01-17 17:00:33 -05:00
Kazuhiro NISHIYAMA
98c81513aa
Accept first pushed branch as deploy-branch
...
And set to DOKKU_DEPLOY_BRANCH.
Idea from https://github.com/dokku/dokku/pull/4167#issuecomment-717607136
2020-12-08 23:15:11 +09:00