pixiteapps / android-cloud-build Goto Github PK
View Code? Open in Web Editor NEWUtilities to build Android apps using Google Cloud Build https://cloud.google.com/cloud-build/
License: Apache License 2.0
Utilities to build Android apps using Google Cloud Build https://cloud.google.com/cloud-build/
License: Apache License 2.0
Given KEY=myCache
${BUCKET}/myCache.tgz
would be extracted into ${SRC_DIR}
without the myCache/
archive root directory.
Unzipping the archive results in /workspace/myCache/
.
I'm not sure why it's unpacked in /workspace
rather than the root /
because of the -C
flag in the command here...but I'm not very familiar with tar
๐คทโโ
tar xpzf "$CACHE_FILE" -C /
The cache is saved and subsequently downloaded successfully. How can I restore
it into (in my case) GRADLE_USER_HOME=/workspace/.gradle
?
PS: This is slick ๐
cloudbuild.yaml
steps:
- name: 'gcr.io/$PROJECT_ID/restore_cache'
id: restore_cache
args:
- '--bucket=gs://${PROJECT_ID}_build_cache'
- '--key=gradle'
- name: 'alpine:latest'
entrypoint: 'sh'
args:
- '-c'
- |
echo Listing root / ...
ls -l /
echo Listing workspace/ ...
ls -l /workspace
echo Listing workspace/gradle/ ...
ls -l /workspace/gradle
- name: 'java:8'
id: build
entrypoint: "bash"
args:
- '-c'
- './gradlew build'
env:
- 'GRADLE_USER_HOME=/workspace/.gradle'
- name: 'gcr.io/$PROJECT_ID/save_cache'
args:
- '--bucket=gs://${PROJECT_ID}_build_cache'
- '--key=gradle'
- '--path=.gradle/wrapper'
- '--path=.gradle/caches'
build log:
tep #0 - "restore_cache": Downloading cache file: gs://${PROJECT_ID}_build_cache/gradle.tgz...
Step #0 - "restore_cache": Restoring cache from file ./gradle.tgz...
Finished Step #0 - "restore_cache"
Step #1: Listing root / ...
Step #1: total 64
Step #1: drwxr-xr-x 2 root root 4096 May 9 20:49 bin
Step #1: drwxr-xr-x 4 root root 4096 May 19 01:27 builder
Step #1: drwxr-xr-x 12 root root 3460 May 19 01:27 dev
Step #1: drwxr-xr-x 1 root root 4096 May 19 01:27 etc
Step #1: drwxr-xr-x 2 root root 4096 May 9 20:49 home
Step #1: drwxr-xr-x 5 root root 4096 May 9 20:49 lib
Step #1: drwxr-xr-x 5 root root 4096 May 9 20:49 media
Step #1: drwxr-xr-x 2 root root 4096 May 9 20:49 mnt
Step #1: drwxr-xr-x 2 root root 4096 May 9 20:49 opt
Step #1: dr-xr-xr-x 115 root root 0 May 19 01:27 proc
Step #1: drwx------ 1 root root 4096 May 19 01:27 root
Step #1: drwxr-xr-x 1 root root 4096 May 19 01:27 run
Step #1: drwxr-xr-x 2 root root 4096 May 9 20:49 sbin
Step #1: drwxr-xr-x 2 root root 4096 May 9 20:49 srv
Step #1: dr-xr-xr-x 13 root root 0 May 19 01:27 sys
Step #1: drwxrwxrwt 2 root root 4096 May 9 20:49 tmp
Step #1: drwxr-xr-x 7 root root 4096 May 9 20:49 usr
Step #1: drwxr-xr-x 11 root root 4096 May 9 20:49 var
Step #1: drwxr-xr-x 6 root root 4096 May 19 01:27 workspace
Step #1: Listing workspace/ ...
Step #1: total 301792
...
Step #1: -rw-rw-r-- 1 root root 3982 May 19 01:26 build.gradle
Step #1: -rw-rw-r-- 1 root root 3162 May 19 01:26 cloudbuild.yaml
Step #1: drwxrwxr-x 3 root root 4096 May 19 01:26 gradle
Step #1: -rw-rw-r-- 1 root root 49 May 19 01:26 gradle.properties
Step #1: -rw-r--r-- 1 root root 308966881 May 19 01:27 gradle.tgz
Step #1: -rwxrwxr-x 1 root root 5296 May 19 01:26 gradlew
Step #1: -rw-rw-r-- 1 root root 101 May 19 01:26 settings.gradle
Step #1: Listing workspace/gradle/ ...
Step #1: total 4
Step #1: drwxrwxr-x 2 root root 4096 May 19 01:26 wrapper
Finished Step #1
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.