You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2019/04/17 11:28:54 UTC
[camel-website] branch pr/deployment updated (a371c96 -> cb5fcaa)
This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a change to branch pr/deployment
in repository https://gitbox.apache.org/repos/asf/camel-website.git.
omit a371c96 chore: GitHub deployments
add 75e9f21 refactor: simplified GitHub actions workflow
add d98c230 refactor: don't use yarn install for build
add 4c0f7b7 CAMEL-11501: Update README and describe build process
add 3b8f70a CAMEL-11501: Update Camel Antora UI README
add e310973 chore: Add Maven build option
add 647760f fix: Use same top level navigation in Hugo and Antora generated pages
add e49f175 chore: Add description how to preview the site locally
add cfd6497 change .yarnrc and add the new yarn version to .yarn/releases/
add c520f9f change antora-ui-camel/.yarnrc and add the new yarn version to antora-ui-camel/.yarn/releases/
new cb5fcaa chore: GitHub deployments
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (a371c96)
\
N -- N -- N refs/heads/pr/deployment (cb5fcaa)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/main.workflow | 8 +-
.gitignore | 2 +
.yarn/releases/{yarn-1.14.0.js => yarn-1.15.2.js} | 5860 ++++++++++----------
.yarnrc | 4 +-
Jenkinsfile | 6 +-
README.md | 221 +-
.../.yarn/releases/yarn-1.15.2.js | 5860 ++++++++++----------
antora-ui-camel/.yarnrc | 4 +-
antora-ui-camel/README.adoc | 63 +-
antora-ui-camel/package.json | 3 +-
antora-ui-camel/src/img/logo32-d.png | Bin 0 -> 1784 bytes
antora-ui-camel/src/partials/header-content.hbs | 48 +-
layouts/partials/header.html | 2 +-
package.json | 3 +-
pom.xml | 166 +
yarn.lock | 539 +-
16 files changed, 6706 insertions(+), 6083 deletions(-)
copy .yarn/releases/{yarn-1.14.0.js => yarn-1.15.2.js} (98%)
copy .yarn/releases/yarn-1.14.0.js => antora-ui-camel/.yarn/releases/yarn-1.15.2.js (98%)
create mode 100644 antora-ui-camel/src/img/logo32-d.png
create mode 100644 pom.xml
[camel-website] 01/01: chore: GitHub deployments
Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a commit to branch pr/deployment
in repository https://gitbox.apache.org/repos/asf/camel-website.git
commit cb5fcaa802f3232912f91fe57583d5a9883163a0
Author: Zoran Regvart <zr...@gmail.com>
AuthorDate: Sun Mar 3 16:19:37 2019 +0100
chore: GitHub deployments
Creates a GitHub deployment for previews and staging environment.
---
.github/action-website/publish | 44 ++++++++++++++++++++++++++++++++++++++----
1 file changed, 40 insertions(+), 4 deletions(-)
diff --git a/.github/action-website/publish b/.github/action-website/publish
index fa7cacf..461727b 100755
--- a/.github/action-website/publish
+++ b/.github/action-website/publish
@@ -2,17 +2,53 @@
set -euxo pipefail
-REV=$(cd "$GITHUB_WORKSPACE" && git rev-parse --short HEAD)
+IS_PULL_REQUEST=$(jq -r .pull_request $GITHUB_EVENT_PATH)
+REF=$(jq -r .ref $GITHUB_EVENT_PATH)
+ENVIRONMENT="preview"
+TRANSIENT="true"
+
+if [ "$IS_PULL_REQUEST" != "null" ]; then
+ DEST_DIR="preview/PR/$(jq .pull_request.number $GITHUB_EVENT_PATH)"
+elif [ "$REF" != "ref/heads/master" ]; then
+ DEST_DIR="preview/branch/${REF##*/}"
+else
+ DEST_DIR=.
+ ENVIRONMENT="staging"
+ TRANSIENT="false"
+fi
PUBLISH_DIR=$(mktemp -d /tmp/publish.XXXXXXXX)
cd $PUBLISH_DIR
git clone -b asf-site https://github.com/apache/camel-website.git .
git config user.email dev@camel.apache.org
-git config user.name "$GITHUB_ACTOR"
+git config user.name $GITHUB_ACTOR
+mkdir -p $DEST_DIR
+cd $DEST_DIR
git rm -r --ignore-unmatch *
-cp -Rvn "${GITHUB_WORKSPACE}/public/"* .
+cp -Rvn $GITHUB_WORKSPACE/public/* .
git add .
-git commit -m "Website updated to ${REV}"
+git commit -m "Website updated to $(git rev-parse --short HEAD)"
git push origin asf-site
+URI=https://api.github.com
+API_HEADER="Accept: application/vnd.github.ant-man-preview+json"
+AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}"
+
+IFS='' read -r -d '' DEPLOYMENT_JSON<<"EOF"
+{
+ "ref": "${REF}",
+ "auto_merge": false,
+ "environment": "${ENVIRONMENT}"
+ "description": "Website built and deployed to ${ENVIRONMENT} environment",
+ "transient": ${TRANSIENT},
+ "payload": "https://apache.camel.com/staging/${DEST_DIR}",
+ "description": "Deploy request from hubot"
+}
+EOF
+
+curl -XPOST -sSL \
+ -H "${AUTH_HEADER}" \
+ -H "${API_HEADER}" \
+ -d "${DEPLOYMENT_JSON}" \
+ "${URI}/repos/apache/camel-website"