mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[ADF-4850] Travis add check bundle size and docker publish (#5023)
* Add a check bundle job after the release * Add a docker push step and update rancher * Split update rancher in a different job * Split update rancher in a different job * Install the adf-cli * Run docker publish and rancher update only on push * Use the adf-cli local code
This commit is contained in:
parent
bfc3f30674
commit
d8961ea904
29
.travis.yml
29
.travis.yml
@ -24,11 +24,18 @@ branches:
|
||||
stages:
|
||||
- name: Lint & Build Dist
|
||||
- name: Unit test
|
||||
- name: Release on npm
|
||||
if: type = push
|
||||
- name: Check bundle
|
||||
if: type = push
|
||||
- name: Deploy docker
|
||||
if: type = push
|
||||
- name: Update Rancher
|
||||
if: type = push
|
||||
- name: e2e Test
|
||||
- name: Deploy PR
|
||||
if: type = pull_request
|
||||
- name: Release on npm
|
||||
if: branch = development AND type = push
|
||||
|
||||
|
||||
addons:
|
||||
chrome: stable
|
||||
@ -91,6 +98,24 @@ jobs:
|
||||
- stage: Release on npm
|
||||
script:
|
||||
- ./lib/dist/cli/bin/adf-cli npm-publish --npmRegistry $NPM_REGISTRY_ADDRESS --tokenRegistry $NPM_REGISTRY_TOKEN --tag $TAG_NPM --pathProject "$(pwd)"
|
||||
- stage: Check bundle
|
||||
script:
|
||||
- ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version)
|
||||
- ./scripts/npm-check-bundles.sh -v ${ADF_VERSION}
|
||||
- stage: Deploy docker
|
||||
script:
|
||||
- TAG_VERSION=$(./scripts/travis/deploy/tag-travis-branch.sh)
|
||||
- echo "Running the docker with tag" $TAG_VERSION
|
||||
- ./lib/dist/cli/bin/adf-cli docker-publish --loginCheck --loginUsername "$DOCKER_REPOSITORY_USER" --loginPassword "$DOCKER_REPOSITORY_PASSWORD" --loginRepo "$DOCKER_REPOSITORY_DOMAIN" --dockerRepo "$DOCKER_REPOSITORY" --dockerTags "$TAG_VERSION" --pathProject "$(pwd)"
|
||||
- stage: Update Rancher
|
||||
script:
|
||||
- TAG_VERSION=$(./scripts/travis/deploy/tag-travis-branch.sh)
|
||||
- ./scripts/rancher-update.sh \
|
||||
--access_key $RANCHER_TOKEN \
|
||||
--secret_key $RANCHER_SECRET \
|
||||
--url $REPO_RANCHER \
|
||||
--environment_name $REPO_RANCHER_ADF_NAME \
|
||||
--image docker:alfresco/demo-shell:$TAG_VERSION
|
||||
|
||||
|
||||
before_deploy:
|
||||
|
9
scripts/travis/deploy/tag-travis-branch.sh
Executable file
9
scripts/travis/deploy/tag-travis-branch.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $TRAVIS_BRANCH == "master" ]]; then
|
||||
TAG_VERSION=$(grep -m1 version package.json | awk '{ print $2 }' | sed 's/[", ]//g')
|
||||
else
|
||||
TAG_VERSION=$TRAVIS_BRANCH-$TRAVIS_BUILD_NUMBER
|
||||
fi;
|
||||
|
||||
echo $TAG_VERSION;
|
Loading…
x
Reference in New Issue
Block a user