-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Travis build tag as sdk version
- Loading branch information
Showing
2 changed files
with
16 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
language: generic | ||
|
||
env: | ||
- RELEASE=3.0.2.8 | ||
branches: | ||
except: | ||
- master | ||
|
||
services: | ||
- docker | ||
|
||
before_install: | ||
- if [ -z "$TRAVIS_TAG" ]; then exit 0; fi | ||
- docker pull coderus/sailfishos-baseimage | ||
- docker run --rm --privileged -it | ||
-e RELEASE=$RELEASE | ||
-e RELEASE=$TRAVIS_TAG | ||
-v $(pwd):/share -w /share | ||
coderus/sailfishos-baseimage | ||
bash build-all.sh | ||
|
||
script: | ||
- if [ -z "$TRAVIS_TAG" ]; then exit 0; fi | ||
- docker import build/platformsdk-i486.tar coderus/sailfishos-platform-sdk-base:latest | ||
- docker tag coderus/sailfishos-platform-sdk-base:latest coderus/sailfishos-platform-sdk-base:$RELEASE | ||
- docker build --build-arg RELEASE=$RELEASE -t coderus/sailfishos-platform-sdk:latest . | ||
- docker tag coderus/sailfishos-platform-sdk:latest coderus/sailfishos-platform-sdk:$RELEASE | ||
- docker tag coderus/sailfishos-platform-sdk-base:latest coderus/sailfishos-platform-sdk-base:$TRAVIS_TAG | ||
- docker build --build-arg RELEASE=$TRAVIS_TAG -t coderus/sailfishos-platform-sdk:latest . | ||
- docker tag coderus/sailfishos-platform-sdk:latest coderus/sailfishos-platform-sdk:$TRAVIS_TAG | ||
- sudo rm -rf build | ||
|
||
deploy: | ||
provider: script | ||
script: bash docker_push | ||
on: | ||
branch: master | ||
tags: true | ||
script: bash docker_push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$TRAVIS_TAG" ]; then exit 0; fi | ||
|
||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
|
||
docker push coderus/sailfishos-platform-sdk-base:latest | ||
docker push coderus/sailfishos-platform-sdk-base:$RELEASE | ||
docker push coderus/sailfishos-platform-sdk-base:$TRAVIS_TAG | ||
|
||
docker push coderus/sailfishos-platform-sdk:latest | ||
docker push coderus/sailfishos-platform-sdk:$RELEASE | ||
docker push coderus/sailfishos-platform-sdk:$TRAVIS_TAG |