[ACA-4653] Migrate release workflow to GHA (#3027)

* [ACA-4653] Run ACA upstream on schedule

* [ACA-4653] Migrate release workflow to GHA

* [ACA-4653] Consistency in naming

* [ACA-4653] Use GH action to configure GH author

* [ACA-4653] Dedicated sh for publish Docker image job

* [ACA-4653] Add missing variables

* [ACA-4653] Delete Travis.yml

* [ACA-4653] CR fixes

* [ACA-4653] Add branch name as action input

* [ACA-4653] Proper env var usage in workflow
This commit is contained in:
MichalKinas 2023-03-03 18:40:37 +01:00 committed by GitHub
parent 3294606fc0
commit e38e72a8e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 394 additions and 129 deletions

View File

@ -15,29 +15,17 @@ runs:
using: "composite"
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@v1.35.0
- name: setup variables
shell: bash
run: |
echo "BUILD_OPTS=--configuration=production,e2e" >> $GITHUB_ENV
echo "TEST_OPTS=" >> $GITHUB_ENV
echo "E2E_PROTRACTOR_OPTS=" >> $GITHUB_ENV
echo "E2E_TSCONFIG=tsconfig.e2e.json" >> $GITHUB_ENV
echo "GIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "SMART_RUNNER_DIRECTORY=.protractor-smartrunner" >> $GITHUB_ENV
echo "BASE_HASH=.protractor-smartrunner" >> $GITHUB_ENV
echo "HEAD_HASH=HEAD" >> $GITHUB_ENV
- uses: ./.github/actions/setup
- name: setup S3 caching
shell: bash
run: |
S3_DBP_PATH="s3://alfresco-travis-builds/aca"
if [ "${{ github.event_name }}" == "push" ]; then
BRANCH_NAME=${GITHUB_REF##*/}
S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/$BRANCH_NAME"
elif [ "${{ github.event_name }}" == "pull_request" ]; then
BRANCH_NAME=${GITHUB_BASE_REF}
S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/$BRANCH_NAME"
echo "BASE_HASH=origin/$BRANCH_NAME" >> $GITHUB_ENV
elif [ "${TRAVIS_EVENT_TYPE}" == "schedule" ]; then
elif [ "${{ github.event_name }}" == "schedule" ]; then
S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/cron"
else
S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/api"

35
.github/actions/git-tag/action.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: "Publish GitHub Tag"
description: "Publish GitHub Tag"
inputs:
github_token:
description: 'Github token'
required: true
type: string
branch_name:
description: 'Name of the branch the workflow runs on'
required: true
type: string
dry-run:
description: dry run flag
required: true
type: boolean
runs:
using: "composite"
steps:
- name: publish tag
shell: bash
run: |
if [[ ${{ inputs.branch_name }} == "master" ]]; then
VERSION=$(grep -m1 version package.json | awk '{ print $2 }' | sed 's/[", ]//g')
fi;
echo "git tag -a ${VERSION} -m ${VERSION}"
if [[ ${{ inputs.dry-run }} == false ]]; then
git tag -a ${VERSION} -m "${VERSION} [ci skip] "
git remote rm origin
GITHUB_REPO=https://${{ inputs.github_token }}:x-oauth-basic@github.com/Alfresco/alfresco-content-app.git
git remote add origin $GITHUB_REPO
git push origin --tags
fi;

View File

@ -0,0 +1,36 @@
name: "Publish Docker Images"
description: "Publish Docker image to quay.io or dockerhub or another domain - only publish the version on master - elsewhere version and branch"
inputs:
domain:
description: 'domain to publish image to'
required: true
type: string
username:
description: 'login username'
required: true
type: string
password:
description: 'login password'
required: true
type: string
dry-run:
description: dry run flag
required: true
type: boolean
runs:
using: "composite"
steps:
- name: Get docker image tag name
shell: bash
run: |
if [[ $BRANCH_NAME == "master" ]]; then
TAG_VERSION=$(grep -m1 version package.json | awk '{ print $2 }' | sed 's/[", ]//g')
else
TAG_VERSION=$BRANCH_NAME-${{ github.run_id }}
fi
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV
- name: Publish image
shell: bash
run: ./scripts/travis/deploy/publish.sh ${{ inputs.domain }} ${{ inputs.username }} ${{ inputs.password }} $TAG_VERSION $BRANCH_NAME ${{ inputs.dry-run }}

112
.github/actions/publish-libs/action.yml vendored Normal file
View File

@ -0,0 +1,112 @@
name: "Publish ACA libs to NPM and GH registry"
description: "Publish ACA libs to NPM and GH registry"
inputs:
github_token:
description: 'Github token'
required: true
type: string
npm-registry-address:
description: 'NPM registry address'
required: true
type: string
npm-registry-token:
description: 'NPM registry token'
required: true
type: string
dry-run:
description: dry run flag
required: true
type: boolean
runs:
using: "composite"
steps:
- name: update libs version
shell: bash
run: |
ROOT_DIR=./../../..
export DIST_DIR=./dist/@alfresco
PROJECTS_DIR=./projects
VERSION_IN_PACKAGE_JSON=$(node -p "require('$ROOT_DIR/package.json').version;")
if [[ $TRAVIS_BRANCH =~ ^master.*?$ ]] ; then
NEW_LIBRARY_VERSION=VERSION_IN_PACKAGE_JSON
else
NEW_LIBRARY_VERSION="${VERSION_IN_PACKAGE_JSON}-${{ github.run_id }}"
fi
echo -e "Branch is '$BRANCH_NAME', therefore publish with '$TAG_NPM' tag\n"
export PROJECTS=(
'aca-shared'
'aca-folder-rules'
'adf-office-services-ext'
'aca-about'
'aca-preview'
'aca-viewer'
'aca-content'
);
for PROJECT in "${PROJECTS[@]}"; do
echo "Update ${PROJECT} version to ${NEW_LIBRARY_VERSION}"
cd $PROJECTS_DIR/${PROJECT}
if [[ ${{ inputs.dry-run }} == false ]]; then
npm version ${NEW_LIBRARY_VERSION}
fi
done
echo -e "\n\nBuild projects"
cd ${ROOT_DIR}
npm run build-libs
- uses: actions/setup-node@v3
name: setup GH registry
with:
node-version-file: '.nvmrc'
registry-url: 'https://npm.pkg.github.com'
scope: '@alfresco'
- name: publish tag to GH registry
shell: bash
run: |
for PROJECT in "${PROJECTS[@]}"
do
cd $DIST_DIR/${PROJECT}
if [[ ${{ inputs.dry-run }} == false ]]; then
echo -e "Publish with dry mode for project to GH registry: $PROJECT\n"
echo -e "npm publish --dry-run --tag $TAG_NPM \n"
npm publish --dry-run --tag $TAG_NPM
else
echo -e "======== Publishing project to GH registry: $PROJECT ========\n"
echo -e "npm publish --tag $TAG_NPM\n"
npm publish --tag $TAG_NPM
fi
done
env:
NODE_AUTH_TOKEN: ${{ inputs.github_token }}
- uses: actions/setup-node@v3
name: setup NPM registry
with:
node-version-file: '.nvmrc'
registry-url: ${{ inputs.npm-registry-address }}
scope: '@alfresco'
- name: publish tag to NPM registry
shell: bash
run: |
for PROJECT in "${PROJECTS[@]}"
do
cd $DIST_DIR/${PROJECT}
if [[ ${{ inputs.dry-run }} == false ]]; then
echo -e "Publish with dry mode for project to NPM registry: $PROJECT\n"
echo -e "npm publish --dry-run --tag $TAG_NPM \n"
npm publish --dry-run --tag $TAG_NPM
else
echo -e "======== Publishing project to NPM registry: $PROJECT ========\n"
echo -e "npm publish --tag $TAG_NPM\n"
npm publish --tag $TAG_NPM
fi
done
env:
NODE_AUTH_TOKEN: ${{ inputs.npm-registry-token }}

38
.github/actions/setup/action.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: "Variables setup"
description: "Variables setup"
runs:
using: "composite"
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@v1.35.0
- name: setup variables
shell: bash
run: |
echo "BUILD_OPTS=--configuration=production,e2e" >> $GITHUB_ENV
echo "TEST_OPTS=" >> $GITHUB_ENV
echo "E2E_PROTRACTOR_OPTS=" >> $GITHUB_ENV
echo "E2E_TSCONFIG=tsconfig.e2e.json" >> $GITHUB_ENV
echo "GIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "SMART_RUNNER_DIRECTORY=.protractor-smartrunner" >> $GITHUB_ENV
echo "BASE_HASH=.protractor-smartrunner" >> $GITHUB_ENV
echo "HEAD_HASH=HEAD" >> $GITHUB_ENV
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.35.0
- name: set TAG_NPM
shell: bash
run: |
VERSION_IN_PACKAGE_JSON=$(node -p "require('./package.json')".version)
echo "version in package.json=${VERSION_IN_PACKAGE_JSON}"
if [[ $BRANCH_NAME =~ ^master(-patch.*)?$ ]]; then
# Pre-release versions
if [[ $VERSION_IN_PACKAGE_JSON =~ ^[0-9]*\.[0-9]*\.[0-9]*-A\.[0-9]*$ ]];
then
TAG_NPM=next
# Stable major versions
else
TAG_NPM=latest
fi
fi
if [[ $BRANCH_NAME =~ ^develop(-patch.*)?$ ]]; then
TAG_NPM=alpha
fi
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV

View File

@ -1,6 +1,8 @@
name: "ACA upstream"
on:
schedule:
- cron: "0 12 * * *"
workflow_call:
workflow_dispatch:
inputs:
@ -32,8 +34,13 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: 'npm'
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.0
with:
username: ${{ vars.BOT_GITHUB_USERNAME }}
email: ${{ vars.BOT_GITHUB_EMAIL }}
global: true
- name: Trigger upstream
shell: bash
run: |
npm install github-api
./scripts/travis/update/update-project.sh -p $TRAVIS_BUILD_NUMBER -t $GH_TOKEN -v alpha -c $TRAVIS_COMMIT -r ${{ inputs.repo_to_update }}
./scripts/travis/update/update-project.sh -p $TRAVIS_BUILD_NUMBER -t $GH_TOKEN -v alpha -c $TRAVIS_COMMIT -r ${{ inputs.repo_to_update || 'alfresco-applications' }}

148
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,148 @@
name: "Release"
on:
workflow_dispatch:
workflow_call:
inputs:
dry-run-release:
description: 'enable dry-run'
required: false
type: boolean
default: true
pull_request:
types: [closed]
branches:
- develop
- master
- develop-patch*
- master-patch*
env:
APP_CONFIG_ECM_HOST: ${{ secrets.PIPELINE_ENV_URL }}
ADMIN_EMAIL: ${{ secrets.PIPELINE_ADMIN_USERNAME }}
ADMIN_PASSWORD: ${{ secrets.PIPELINE_ADMIN_PASSWORD }}
AWS_REGION: "eu-west-2"
CONTENT_CE_DIST_PATH: "./dist/content-ce"
APP_CONFIG_PROVIDER: ECM
APP_CONFIG_AUTH_TYPE: BASIC
APP_CONFIG_OAUTH2_HOST: http://localhost:4200/auth/realms/alfresco
PLAYWRIGHT_E2E_HOST: "http://localhost:4200"
APP_CONFIG_OAUTH2_CLIENTID: alfresco
APP_CONFIG_PLUGIN_AOS: true
APP_CONFIG_PLUGIN_CONTENT_SERVICE: true
APP_CONFIG_PLUGIN_FOLDER_RULES: true
APP_CONFIG_ENABLE_MOBILE_APP_SWITCH: true
APP_CONFIG_SESSION_TIME_FOR_OPEN_APP_DIALOG_DISPLAY_IN_HOURS: "12"
APP_CONFIG_OAUTH2_IMPLICIT_FLOW: true
APP_CONFIG_OAUTH2_SILENT_LOGIN: true
APP_CONFIG_OAUTH2_REDIRECT_LOGOUT: /
APP_CONFIG_OAUTH2_REDIRECT_LOGIN: /
APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI: "{protocol}//{hostname}{:port}/assets/silent-refresh.html"
jobs:
setup:
if: github.event.pull_request.merged || ${{ inputs.dry-run-release }}
name: "Setup"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- uses: ./.github/actions/setup
publish-docker-registry:
needs: [setup]
if: github.event.pull_request.merged || ${{ inputs.dry-run-release }}
name: "Publish to registry"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- uses: ./.github/actions/setup
- name: publish
uses: ./.github/actions/publish-image
with:
domain: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
dry-run: ${{ inputs.dry-run-release }}
publish-to-dockerhub:
needs: [setup]
if: github.event.pull_request.merged || ${{ inputs.dry-run-release }}
name: "Publish to Dockerhub"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- uses: ./.github/actions/setup
- name: publish
uses: ./.github/actions/publish-image
with:
domain: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dry-run: ${{ inputs.dry-run-release }}
publish-git-tag:
needs: [setup]
if: (github.event.pull_request.merged && $BRANCH_NAME == "master")|| ${{ inputs.dry-run-release }}
name: "Publish git tag"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- uses: ./.github/actions/setup
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.0
with:
username: ${{ vars.BOT_GITHUB_USERNAME }}
email: ${{ vars.BOT_GITHUB_EMAIL }}
global: true
- name: publish
uses: ./.github/actions/git-tag
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch_name: ${{ env.BRANCH_NAME }}
dry-run: ${{ inputs.dry-run-release }}
publish-libs:
needs: [setup]
if: github.event.pull_request.merged || ${{ inputs.dry-run-release }}
name: "Publish libs to npm and gh registry"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: ./.github/actions/setup
- name: publish
uses: ./.github/actions/publish-libs
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
npm-registry-address: ${{ vars.NPM_REGISTRY_ADDRESS }}
npm-registry-token: ${{ secrets.NPM_REGISTRY_TOKEN }}
dry-run: ${{ inputs.dry-run-release }}

View File

@ -1,97 +0,0 @@
# =================
# merge anchor
# =================
dist: bionic
sudo: required
services:
- xvfb
addons:
chrome: stable
language: node_js
node_js:
- '14'
cache:
directories:
- node_modules
branches:
only:
- master
- develop
- /.*beta.*/
before_install: . ./scripts/ci/job_hooks/before_install.sh
install: echo "no install"
stages:
- name: Publish Docker Registry
if: type = push
- name: Release Tag and Publish to Dockerhub
if: branch = master AND type = push
- name: Release Libraries
if: type = push
- name: Trigger DW
if: branch = develop AND (type = cron OR (type = api AND commit_message =~ /\[trigger aca\]/))
env:
global:
- ADMIN_EMAIL=$ADMIN_EMAIL_REMOTE
- ADMIN_PASSWORD=$ADMIN_PASSWORD_REMOTE
- PLAYWRIGHT_E2E_HOST="http://localhost:4200"
- CONTENT_CE_DIST_PATH="./dist/content-ce"
# APP CONFIG DEFAULTS
- APP_CONFIG_PROVIDER=ECM
- APP_CONFIG_AUTH_TYPE=BASIC
- APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco
- APP_CONFIG_OAUTH2_CLIENTID=alfresco
- APP_CONFIG_PLUGIN_AOS=true
- APP_CONFIG_PLUGIN_CONTENT_SERVICE=true
- APP_CONFIG_ENABLE_MOBILE_APP_SWITCH=true
- APP_CONFIG_SESSION_TIME_FOR_OPEN_APP_DIALOG_DISPLAY_IN_HOURS="12"
- APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true
- APP_CONFIG_OAUTH2_SILENT_LOGIN=true
- APP_CONFIG_OAUTH2_REDIRECT_LOGOUT=/
- APP_CONFIG_OAUTH2_REDIRECT_LOGIN=/
- APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI="{protocol}//{hostname}{:port}/assets/silent-refresh.html"
jobs:
include:
- stage: Publish Docker Registry
name: Publish Docker Registry
script: ./scripts/travis/deploy/publish.sh "content-ce" "$DOCKER_REPOSITORY_DOMAIN" "$QUAY_USERNAME" "$QUAY_PASSWORD"
- stage: Release Tag and Publish to Dockerhub
name: Release Tag
script: ./scripts/travis/release/git-tag.sh
- stage: Release Libraries
name: Release Libraries
script:
- npm ci
- ./scripts/ci/npm/publish-libs.sh
cache: false
- name: Publish to Dockerhub
script: ./scripts/travis/deploy/publish.sh "content-ce" "$DOCKER_HUB_REPOSITORY_DOMAIN" "$DOCKER_HUB_USERNAME" "$DOCKER_HUB_PASSWORD"
- stage: Trigger DW
script:
- ./scripts/trigger-travis.sh --branch $TRAVIS_BRANCH Alfresco alfresco-applications $TRAVIS_API_TOKEN
- ./scripts/travis/update/update-project.sh -p $TRAVIS_BUILD_NUMBER -t $GITHUB_TOKEN -v alpha -c $TRAVIS_COMMIT -r alfresco-applications
notifications:
slack:
on_pull_requests: false
rooms:
secure: 'qcTP/+rhVweMSZZAQMPz4sW7boS8XC0RX1SPYgg7hIfxBr9747WpRLkJ1sirkVaXI/6XfYAyl42CTfPmTuJxIC+co/NSnEDknwVsnKZd0O/ykTpo+mxIN4BTZX8dm+gELR5IEYQPs+Yki3ZnD9b+0mCK1yD8JallKCQeE2U9BhzZhP/Fn0ce35EulybNp3QQDaox0XC+7gadMdxlvK8mzP1scw76wRLtx25QLxxV+OwEw0bzyh8y3onfjHfnoDcUQWRTNdnjapzmgf1LNdC202A5kwp5sJggfSDr+ActRqaMvv4BbMsFpdan34B6zPQJfyZL1r8IB8O8BEKcAaOUVcTjnZAOom8kHS8F07/mo5xnNYmV8oNX2/egr1CiG4U0EAGF2XGqM+vetYnF88LTEzy84kVxmSwKGVfzlGOyTplMXJ1iCENndtfWm1AXhAFj5RSsSAZg6IStTM+mcpnC75moEwQtj8bTenwehHz1HQAjQX7xeTQo27SxDc7oqp1ReyXCllMjKxckjVGmp2j6yxn1Jl55kivBj57vluLtEtziOGluVELP5E2fV0VAuErNhnjLm4LJARVN76PQaTOXYwATVVJJDhb/77TesvxQsr3VfiROEKm7QB7IDFjghjLLisSX67JQ5+7K/qMlqf9+9hNw4n0v1eMylVjt+gyxspc='
on_failure: always
on_success: change
template:
- 'Repo `%{repository_slug}` *%{result}* build (<%{build_url}|#%{build_number}>) for commit (<%{compare_url}|%{commit}>) on branch `%{branch}`.'
- 'Author: %{author} Execution time: *%{duration}*'
- 'Message: %{message}'

View File

@ -1,26 +1,27 @@
#!/usr/bin/env bash
#!/bin/bash -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_AFFECTED="$1"
DOMAIN="$2"
USERNAME="$3"
PASSWORD="$4"
cd $DIR/../../../
DOMAIN="$1"
USERNAME="$2"
PASSWORD="$3"
TAG_VERSION="$4"
BRANCH_NAME="$5"
DRY_RUN="$6"
npm ci && npm run build.release
# Get Tag Image
TAG_VERSION=$(./scripts/travis/deploy/get-docker-image-tag-name.sh)
echo "Running the docker with tag" $TAG_VERSION
DOCKER_PROJECT_ARGS="PROJECT_NAME=$PROJECT_AFFECTED"
DOCKER_PROJECT_ARGS="PROJECT_NAME=content-ce"
DOCKER_REPOSITORY="$DOMAIN/$REPO_SLUG"
# Publish Image to quay.io or dockerhub or another domain - only publish the version on master - elsewhere version and branch
if [[ $TRAVIS_BRANCH == "master" ]]; then
echo "npx @alfresco/adf-cli docker-publish --loginCheck --loginUsername '$USERNAME' --loginPassword '$PASSWORD' --loginRepo '$DOMAIN' --dockerRepo '$DOCKER_REPOSITORY' --buildArgs $DOCKER_PROJECT_ARGS --dockerTags '$TAG_VERSION' "
npx @alfresco/adf-cli docker-publish --loginCheck --loginUsername "$USERNAME" --loginPassword "$PASSWORD" --loginRepo "$DOMAIN" --dockerRepo "$DOCKER_REPOSITORY" --buildArgs "$DOCKER_PROJECT_ARGS" --dockerTags "$TAG_VERSION" --pathProject "$(pwd)"
if [[ $DRY_RUN == false ]]; then
npx @alfresco/adf-cli docker-publish --loginCheck --loginUsername "$USERNAME" --loginPassword "$PASSWORD" --loginRepo "$DOMAIN" --dockerRepo "$DOCKER_REPOSITORY" --buildArgs "$DOCKER_PROJECT_ARGS" --dockerTags "$TAG_VERSION" --pathProject "$(pwd)"
fi;
else
echo "npx @alfresco/adf-cli docker-publish --loginCheck --loginUsername '$USERNAME' --loginPassword '$PASSWORD' --loginRepo '$DOMAIN' --dockerRepo '$DOCKER_REPOSITORY' --buildArgs $DOCKER_PROJECT_ARGS --dockerTags '$TAG_VERSION,$TRAVIS_BRANCH' "
npx @alfresco/adf-cli docker-publish --loginCheck --loginUsername "$USERNAME" --loginPassword "$PASSWORD" --loginRepo "$DOMAIN" --dockerRepo "$DOCKER_REPOSITORY" --buildArgs "$DOCKER_PROJECT_ARGS" --dockerTags "$TAG_VERSION,$TRAVIS_BRANCH" --pathProject "$(pwd)"
echo "npx @alfresco/adf-cli docker-publish --loginCheck --loginUsername '$USERNAME' --loginPassword '$PASSWORD' --loginRepo '$DOMAIN' --dockerRepo '$DOCKER_REPOSITORY' --buildArgs $DOCKER_PROJECT_ARGS --dockerTags '$TAG_VERSION,$BRANCH_NAME' "
if [[ $DRY_RUN == false ]]; then
npx @alfresco/adf-cli docker-publish --loginCheck --loginUsername "$USERNAME" --loginPassword "$PASSWORD" --loginRepo "$DOMAIN" --dockerRepo "$DOCKER_REPOSITORY" --buildArgs "$DOCKER_PROJECT_ARGS" --dockerTags "$TAG_VERSION,$BRANCH_NAME" --pathProject "$(pwd)"
fi;
fi;

View File

@ -1,8 +1,5 @@
#!/usr/bin/env bash
git config --global user.name "alfresco-build"
git config --global user.email "alfresco-build@hyland.com"
BUILD_PIPELINE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REPO_DIR="$BUILD_PIPELINE_DIR/../.."