Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
labs-build committed Jun 27, 2018
2 parents 2cfc725 + beeaf47 commit a227a17
Show file tree
Hide file tree
Showing 312 changed files with 7,123 additions and 2,447 deletions.
9 changes: 0 additions & 9 deletions .build/is-feature-branch-version.sh

This file was deleted.

15 changes: 8 additions & 7 deletions .build/remove-snapshot-artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
echo "--------------------------------------------------------------------------------"
echo ".... remove git tags"
export PATTERN="SNAPSHOT"
echo ".... remove git tags for pattern:$PATTERN"
git fetch --tags
tags=$(git tag | grep SNAPSHOT)
tags=$(git tag | grep $PATTERN)
echo $tags | xargs -n1 echo

if [[ "$1" == "-y" ]]; then
Expand All @@ -19,10 +20,10 @@ else
exit 0
fi
echo "--------------------------------------------------------------------------------"
echo "... remove old SNAPSHOT zip and installer files?"
echo "... remove old $PATTERN zip and installer files?"

ssh [email protected] -4 'ls /home/sakuli/htdocs/install/sakuli-v*-SNAPSHOT*.zip'
ssh [email protected] -4 'ls /home/sakuli/htdocs/install/sakuli-v*-SNAPSHOT*.jar'
ssh [email protected] -4 'ls /home/sakuli/htdocs/install/sakuli-v*-'"$PATTERN"'*.zip'
ssh [email protected] -4 'ls /home/sakuli/htdocs/install/sakuli-v*-'"$PATTERN"'*.jar'

if [[ "$1" == "-y" ]]; then
CONT="y"
Expand All @@ -32,7 +33,7 @@ else
fi

if [ "$CONT" = "y" ]; then
ssh [email protected] -4 'rm /home/sakuli/htdocs/install/sakuli-v*-SNAPSHOT*.zip' || echo "do not fail if nothing have changed"
ssh [email protected] -4 'rm /home/sakuli/htdocs/install/sakuli-v*-SNAPSHOT*.jar' || echo "do not fail if nothing have changed"
ssh [email protected] -4 'rm /home/sakuli/htdocs/install/sakuli-v*-'"$PATTERN"'*.zip' || echo "do not fail if nothing have changed"
ssh [email protected] -4 'rm /home/sakuli/htdocs/install/sakuli-v*-'"$PATTERN"'*.jar' || echo "do not fail if nothing have changed"
fi

12 changes: 4 additions & 8 deletions .build/set-build-env-vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@
#GIT_BRANCH=origin/feature/#219_sahi_error
#SAKULI_VERSION=v1-SNAPSHOT-219_sahi_error
#SAKULI_VERSION=v1-SNAPSHOT
set -u

echo "branch= $GIT_BRANCH"
SAKULI_BRANCH=${GIT_BRANCH/origin\/}
echo "SAKULI_BRANCH=$SAKULI_BRANCH" > $WORKSPACE/myjob.properties

FEATURE_NAME=${GIT_BRANCH:$(expr index \"$GIT_BRANCH\" '#') -1 }
echo "FEATURE_NAME=$FEATURE_NAME" >> $WORKSPACE/myjob.properties

SAKULI_VERSION="$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[')"
SAKULI_VERSION="$(printf 'VER\t${project.version}' | mvn help:evaluate | grep '^VER' | cut -f2)"
echo "SAKULI_VERSION=$SAKULI_VERSION" >> $WORKSPACE/myjob.properties
VERSION_SURFIX=${SAKULI_VERSION:$(expr index \"$SAKULI_VERSION\" 'SNAPSHOT') +7 }
echo "VERSION_SURFIX=$VERSION_SURFIX" >> $WORKSPACE/myjob.properties

echo "SAKULI_FEATURE_VERSION=$SAKULI_VERSION-$FEATURE_NAME" >> $WORKSPACE/myjob.properties
#no difference since https://github.com/ConSol/sakuli/issues/317
echo "SAKULI_FEATURE_VERSION=$SAKULI_VERSION" >> $WORKSPACE/myjob.properties

if [[ $SAKULI_BRANCH == dev ]] || [[ $SAKULI_BRANCH == feature* ]] ; then
SAKULI_DOC_BRANCH=$SAKULI_BRANCH
Expand Down
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@
*.png binary
*.jpg binary
*.pdf binary

# files with LF
*.twig text eol=lf
TestCase_*.txt eol=lf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ key3.db
.gearman-cache
.sakuli-steps-cache
Dockerfile.local
**/test-output/
8 changes: 7 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:./docs/images/sakuli_logo_small.png[sakuli-logo]

:sakuli-latest-version: v1.1.0
:sakuli-latest-version: v1.2.0
:sakuli-doc-base-url: http://consol.github.io/sakuli
:sakuli-doc-url: {sakuli-doc-base-url}/latest

Expand Down Expand Up @@ -70,6 +70,12 @@ The complete versions of our documentation you can find under:
[link={sakuli-doc-url}/files/Sakuli_Short_Overview.pdf]
image::./docs/images/Sakuli_Short_Overview.png[Sakuli Short Overview Presentation]

= Sakuli UI Introduction

video::5RJY_FD6YvQ[youtube]

https://github.com/ConSol/sakuli-ui[]

- - -

image::./docs/images/bmi_logo_eng.png[Supported by Federal Ministry for Economic Affairs and Energy]
99 changes: 99 additions & 0 deletions docker/.build/delete_dockerhub_tags.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#!/usr/bin/env bash

set -e -o pipefail

IMAGES=(
"consol/sakuli-ubuntu-xfce"
"consol/sakuli-ubuntu-xfce-java"
"consol/sakuli-ubuntu-icewm"
"consol/sakuli-ubuntu-icewm-java"
"consol/sakuli-centos-xfce"
"consol/sakuli-centos-xfce-java"
"consol/sakuli-centos-icewm"
"consol/sakuli-centos-icewm-java"
"consol/sakuli-ui"
"consol/omd-labs-ubuntu-sakuli"
"consol/omd-labs-centos-sakuli"
"consol/omd-labs-debian-sakuli"
)
PATTERN="SNAPSHOT"
#PATTERN="v1.1.0-SNAPSHOT"

logfile="docker.delete.images.log"
SAVEMODE=$1

echo "" > $logfile
token=""
function loginToDocker() {
if [[ $HUB_USERNAME == "" ]] || [[ $HUB_PASSWORD == "" ]] ; then
echo "please set dockerhub login credentials via env vars: 'HUB_USERNAME' and 'HUB_PASSWORD'"
exit -1
fi
json=$(curl -s --fail -i -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"username":"'${HUB_USERNAME}'","password":"'${HUB_PASSWORD}'"}' \
https://hub.docker.com/v2/users/login/ | grep "{" )
# echo $json
# echo "--------------------"
token=$(echo $json | jq --raw-output '.token' )

echo TOKEN: $token
echo "logged in user: $HUB_USERNAME"
echo "--------------------"
}

function deleteTags () {
if [[ $1 == "" ]] ; then
echo "use function: deleteTag <user/repo>"
exit -1
fi

echo "getTags: ${1}"
json=$(curl --fail -i -X GET \
https://hub.docker.com/v2/repositories/${1}/tags/ | grep "{")
# echo "$json"
# echo "-------------------------"

### ensure continue if no tags are matching
set +e +o pipefail
tags=$( echo "$json" | jq --raw-output '.results[].name' | grep $PATTERN )
set -e -o pipefail

echo "-------------------------"
echo "TAGS:"
echo "$tags"
echo "-------------------------"

if [[ $tags == "" ]] ; then echo "no tags" && return ; fi

for tag in $tags ; do
echo "delete ${1}:${tag}"
echo "${1}:${tag}" >> $logfile

if [[ "$SAVEMODE" != "--save" ]] ; then
curl --fail -i -X DELETE \
-H "Accept: application/json" \
-H "Authorization: JWT $token" \
"https://hub.docker.com/v2/repositories/${1}/tags/${tag}/"
fi
echo "........................."
done
}

function logout() {
echo "logout user: $HUB_USERNAME"
curl -s -i --fail -X POST \
-H "Accept: application/json" \
-H "Authorization: JWT $token" \
https://hub.docker.com/v2/logout/
}

loginToDocker
#deleteTags "consol/sakuli-ubuntu-xfce"
#Loop
for IMAGE in "${IMAGES[@]}" ; do
deleteTags $IMAGE
done
logout
echo "-----------> DONE!"
17 changes: 13 additions & 4 deletions docker/.build/tag_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ set -e -o pipefail
SRC_TAG=$1
TARGET_TAG=$2
SAVEMODE=$3
logfile="docker.tagged.images.log"

echo "tag $SRC_TAG -> $TARGET_TAG"
if [[ $SRC_TAG == "" ]] || [[ $TARGET_TAG == "" ]] ; then
echo "ERROR: execute script like: tag_image.sh <src-tag> <target-tag> [--save]"
exit -1
fi
echo "" > $logfile

IMAGES=(
"consol/sakuli-ubuntu-xfce"
Expand All @@ -19,18 +22,24 @@ IMAGES=(
"consol/sakuli-centos-xfce-java"
"consol/sakuli-centos-icewm"
"consol/sakuli-centos-icewm-java"
"consol/sakuli-ui"
)

#Loop
for IMAGE in "${IMAGES[@]}"
do
for IMAGE in "${IMAGES[@]}"; do
echo "IMAGE: $IMAGE:$SRC_TAG"
docker pull $IMAGE:$SRC_TAG
docker run -it -e TESTSUITE_BROWSER=firefox $IMAGE:$SRC_TAG
docker run -it -e TESTSUITE_BROWSER=chrome $IMAGE:$SRC_TAG

# skip test of sakuli UI image
if [[ $IMAGE != "consol/sakuli-ui" ]]; then
docker run -it -p 6911:6901 -e TESTSUITE_BROWSER=firefox $IMAGE:$SRC_TAG
docker run -it -p 6911:6901 -e TESTSUITE_BROWSER=chrome $IMAGE:$SRC_TAG
fi

docker tag $IMAGE:$SRC_TAG $IMAGE:$TARGET_TAG
if [[ "$SAVEMODE" != "--save" ]] ; then
docker push $IMAGE:$TARGET_TAG
fi
echo "$IMAGE:$SRC_TAG" >> $logfile
echo " - done!"
done
1 change: 1 addition & 0 deletions docker/.build/trigger_dockerhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ echo "trigger dockerhub builds for Tag $GIT_TAG:"

URLS=(
"https://registry.hub.docker.com/u/consol/sakuli-ubuntu-xfce/trigger/76b9b474-97e7-472a-a807-fa1829ef4b93/"
"https://registry.hub.docker.com/u/consol/sakuli-ui/trigger/afb8b1c4-66a9-43dd-8787-e30f1007e513/"
"https://registry.hub.docker.com/u/consol/omd-labs-ubuntu-sakuli/trigger/6cdc0a55-5926-4fd7-81ce-d97e97aee63c/"
"https://registry.hub.docker.com/u/consol/sakuli-ubuntu-xfce-java/trigger/62342ff8-d1cb-4111-b298-e43ffdf3d4f7/"
"https://registry.hub.docker.com/u/consol/sakuli-ubuntu-icewm/trigger/453572ea-3272-46b6-a8fb-9ef95c4e655d/"
Expand Down
12 changes: 6 additions & 6 deletions docker/Dockerfile.sakuli.centos.icewm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This Dockerfile is used to build a sakuli image based on CentOS

FROM consol/centos-icewm-vnc:1.2.3
FROM consol/centos-icewm-vnc:1.3.0

MAINTAINER Tobias Schneck "[email protected]"
ENV REFRESHED_AT 2017-12-18
ENV REFRESHED_AT 2018-06-27

LABEL io.k8s.description="Sakuli headless testing container with Xfce window manager, firefox and chromium" \
io.k8s.display-name="Sakuli testing container based on Centos and Xfce" \
Expand All @@ -20,7 +20,7 @@ ENV VNC_PORT=5901 \

## Connection ports for controlling the UI:
# VNC port:5901
# noVNC webport, connect via http://IP:6901/vnc_auto.html?password=vncpassword
# noVNC webport, connect via http://IP:6901/?password=sakuli
EXPOSE $VNC_PORT $NO_VNC_PORT

# use root user for installation
Expand All @@ -38,7 +38,7 @@ RUN $INST_SCRIPTS/java_jre.sh
RUN $INST_SCRIPTS/java_jce_test/jce_test.sh

### Install Sakuli
ARG SAKULI_VERSION=1.1.0
ARG SAKULI_VERSION=1.2.0
# SAKULI_UMASK: Testsuite folder default permissions after text execution
# SAKULI_EXAMPLE_TEST_SUITE: Define the example which will be used as default test
# SAKULI_TEST_SUITE: Define Sakuli default startup testsuite
Expand All @@ -53,9 +53,9 @@ RUN $INST_SCRIPTS/sakuli.sh

### configure startup
ADD ./sakuli-client/src/common/scripts $STARTUPDIR
RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR $HOME
RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR
# use headless user for startup
USER 1984
USER 1000

### Sakuli startup script
# no parameters:
Expand Down
12 changes: 6 additions & 6 deletions docker/Dockerfile.sakuli.centos.icewm.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This Dockerfile is used to build a sakuli image based on CentOS

FROM consol/centos-icewm-vnc:1.2.3
FROM consol/centos-icewm-vnc:1.3.0

MAINTAINER Tobias Schneck "[email protected]"
ENV REFRESHED_AT 2017-12-18
ENV REFRESHED_AT 2018-06-27

LABEL io.k8s.description="Sakuli headless testing container (maven java tests) with IceWM window manager, firefox and chromium" \
io.k8s.display-name="Sakuli testing container (maven java tests) based on Centos and IceWM" \
Expand All @@ -20,7 +20,7 @@

## Connection ports for controlling the UI:
# VNC port:5901
# noVNC webport, connect via http://IP:6901/vnc_auto.html?password=vncpassword
# noVNC webport, connect via http://IP:6901/?password=sakuli
EXPOSE $VNC_PORT $NO_VNC_PORT

# use root user for installation
Expand All @@ -45,7 +45,7 @@
RUN $INST_SCRIPTS/maven.sh

### Install Sakuli
ARG SAKULI_VERSION=1.1.0
ARG SAKULI_VERSION=1.2.0
# SAKULI_UMASK: Testsuite folder default permissions after text execution
# SAKULI_TEST_SUITE Define Sakuli default startup testsuite
ENV SAKULI_UMASK=0000 SAKULI_TEST_SUITE=/opt/maven
Expand All @@ -58,9 +58,9 @@
### configure startup
ADD ./sakuli-client/src/common/scripts/ $STARTUPDIR
ADD ./sakuli-client/src_java/common/scripts/ $STARTUPDIR
RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR $HOME $SAKULI_TEST_SUITE
RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR
# use headless user for startup
USER 1984
USER 1000

### Sakuli startup script
# no parameters:
Expand Down
12 changes: 6 additions & 6 deletions docker/Dockerfile.sakuli.centos.xfce
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This Dockerfile is used to build a sakuli image based on CentOS

FROM consol/centos-xfce-vnc:1.2.3
FROM consol/centos-xfce-vnc:1.3.0

MAINTAINER Tobias Schneck "[email protected]"
ENV REFRESHED_AT 2017-12-18
ENV REFRESHED_AT 2018-06-27

LABEL io.k8s.description="Sakuli headless testing container with IceWM window manager, firefox and chromium" \
io.k8s.display-name="Sakuli testing container based on Centos and IceWM" \
Expand All @@ -20,7 +20,7 @@ ENV VNC_PORT=5901 \

## Connection ports for controlling the UI:
# VNC port:5901
# noVNC webport, connect via http://IP:6901/vnc_auto.html?password=vncpassword
# noVNC webport, connect via http://IP:6901/?password=sakuli
EXPOSE $VNC_PORT $NO_VNC_PORT

# use root user for installation
Expand All @@ -38,7 +38,7 @@ RUN $INST_SCRIPTS/java_jre.sh
RUN $INST_SCRIPTS/java_jce_test/jce_test.sh

### Install Sakuli
ARG SAKULI_VERSION=1.1.0
ARG SAKULI_VERSION=1.2.0
# SAKULI_UMASK: Testsuite folder default permissions after text execution
# SAKULI_EXAMPLE_TEST_SUITE: Define the example which will be used as default test
# SAKULI_TEST_SUITE: Define Sakuli default startup testsuite
Expand All @@ -53,9 +53,9 @@ RUN $INST_SCRIPTS/sakuli.sh

### configure startup
ADD ./sakuli-client/src/common/scripts $STARTUPDIR
RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR $HOME
RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR
# use headless user for startup
USER 1984
USER 1000

### Sakuli startup script
# no parameters:
Expand Down
Loading

0 comments on commit a227a17

Please sign in to comment.