mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-24 16:49:26 +01:00
PUSH_DOCKER checks
This commit is contained in:
parent
06ec65fb10
commit
9a55202a9f
15
appveyor.yml
15
appveyor.yml
@ -21,6 +21,7 @@ init:
|
|||||||
install:
|
install:
|
||||||
- ps: |
|
- ps: |
|
||||||
$env:PACKAGE_VERSION = (Get-Content -Raw -Path .\package.json | ConvertFrom-Json).version
|
$env:PACKAGE_VERSION = (Get-Content -Raw -Path .\package.json | ConvertFrom-Json).version
|
||||||
|
$env:PUSH_DOCKER = "false"
|
||||||
$env:PROD_DEPLOY = "false"
|
$env:PROD_DEPLOY = "false"
|
||||||
$env:TAG_NAME = ""
|
$env:TAG_NAME = ""
|
||||||
if($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_RE_BUILD -eq "True") {
|
if($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_RE_BUILD -eq "True") {
|
||||||
@ -28,6 +29,9 @@ install:
|
|||||||
$env:TAG_NAME = $env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")
|
$env:TAG_NAME = $env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")
|
||||||
echo "This is a production deployment for ${env:TAG_NAME}."
|
echo "This is a production deployment for ${env:TAG_NAME}."
|
||||||
}
|
}
|
||||||
|
if("${env:DOCKER_USERNAME}" -ne "" -and "${env:DOCKER_PASSWORD}" -ne "") {
|
||||||
|
$env:PUSH_DOCKER = "true"
|
||||||
|
}
|
||||||
if($isWindows) {
|
if($isWindows) {
|
||||||
choco install cloc --no-progress
|
choco install cloc --no-progress
|
||||||
cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
|
cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
|
||||||
@ -37,7 +41,7 @@ before_build:
|
|||||||
- node --version
|
- node --version
|
||||||
- npm --version
|
- npm --version
|
||||||
- sh: |
|
- sh: |
|
||||||
if [ "${DOCKER_USERNAME}" != "" -a "${DOCKER_PASSWORD}" != "" ]
|
if [ "${PUSH_DOCKER}" == "true" ]
|
||||||
then
|
then
|
||||||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
fi
|
fi
|
||||||
@ -57,6 +61,8 @@ build_script:
|
|||||||
}
|
}
|
||||||
|
|
||||||
docker images
|
docker images
|
||||||
|
|
||||||
|
if($env:PUSH_DOCKER -eq "true") {
|
||||||
./build.sh push dev
|
./build.sh push dev
|
||||||
|
|
||||||
if($env:PROD_DEPLOY -eq "true") {
|
if($env:PROD_DEPLOY -eq "true") {
|
||||||
@ -65,8 +71,13 @@ build_script:
|
|||||||
./build.sh push $env:TAG_NAME
|
./build.sh push $env:TAG_NAME
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
- cmd: npm install
|
- cmd: npm install
|
||||||
- cmd: npm run build:prod
|
- cmd: npm run build:prod
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
- sh: docker logout
|
- sh: |
|
||||||
|
if [ "${PUSH_DOCKER}" == "true" ]
|
||||||
|
then
|
||||||
|
docker logout
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user