Skip to content

Commit e10e8a0

Browse files
authored
Merge pull request #136 from appwrite/feat-automate-cli-deploy
Automate CLI SDK deployment to Docker Hub
2 parents 50ce5fd + 1fa666a commit e10e8a0

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

src/SDK/Language/CLI.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ public function getFiles()
226226
'template' => '/cli/app/services/init.php.twig',
227227
'minify' => false,
228228
],
229+
[
230+
'scope' => 'default',
231+
'destination' => '.travis.yml',
232+
'template' => '/cli/.travis.yml.twig',
233+
'minify' => false,
234+
],
229235
];
230236
}
231237

templates/cli/.travis.yml.twig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
os: linux
2+
dist: xenial
3+
4+
language: shell
5+
6+
services:
7+
- docker
8+
9+
before_install:
10+
- curl -fsSL https://get.docker.com | sh
11+
- echo '{"experimental":"enabled"}' | sudo tee /etc/docker/daemon.json
12+
- mkdir -p $HOME/.docker
13+
- echo '{"experimental":"enabled"}' | sudo tee $HOME/.docker/config.json
14+
- sudo service docker start
15+
- >
16+
if [ ! -z "${DOCKERHUB_PULL_USERNAME:-}" ]; then
17+
echo "${DOCKERHUB_PULL_PASSWORD}" | docker login --username "${DOCKERHUB_PULL_USERNAME}" --password-stdin
18+
fi
19+
- docker --version
20+
- docker run --rm --privileged linuxkit/binfmt:v0.8
21+
- docker buildx create --use
22+
23+
script:
24+
- docker ps; docker buildx ls
25+
26+
deploy:
27+
- provider: script
28+
edge: true
29+
script: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/s390x -t appwrite/cli:$TRAVIS_TAG ./ --push
30+
on:
31+
tags: true

0 commit comments

Comments
 (0)