-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds build steps in makefile for building Chrome and Firefox betas (#…
…1658) * Added build steps to build Chrome Beta and Firefox Beta nodes and standalone from the makefile. * Adding steps to deploy the beta browser versions with basic TAG_VERSION * Create update-dev-beta-browser-images.yml * fix typo * removed a generate task from Makefile. Scraping selenium version from the Base/Dockerfile. * Fixed dependency for standalone beta images. Added in edge, including accidentally deleted standalone_edge... * Make sure we're building the beta versions when testing them * Added edge to makefile, also added support for dev versions of the browsers. Also, retagging node-base and hub as dev/beta to make the testing process easier. * google chrome dev channel is 'google-chrome-unstable' * Modified NodeChrome Dockerfile to try back one more chromedriver version if the one for dev is not available. Also, added matrix strategy with fail-fast false to build, test, and deploy whatever platforms pass testing. * Move matrix environment variables from step to job * try again * debug why it is failing * Fix typo * fix typo * fix typo * tag base with channel name as well * Fix typo * If dev chromedriver is not available, try with the one previous - fixing the logic on this * Successful build, but I think the non-dev images are being built prior to testing, so adding SKIP_BUILD argument from seleniarm repo. Adding deploy steps. * tag node-base and hub and pull from docker hub for faster building and testing. Output browser and driver versions in the logs * Eliminate rebuilding the images by removing the Makefile node_base dependency. * Removed unneeded steps and replace NAME with 'selenium' * Fix note capitalization at the end. Added schedule cron to trigger every 2 days. * only geckodriver version needs to be displayed * change namespace to selenium and remove workflow dispatch
- Loading branch information
1 parent
f6b2147
commit f854140
Showing
5 changed files
with
142 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Update Dev/Beta Browser Images | ||
|
||
on: | ||
schedule: | ||
# Trigger build every 2 days | ||
- cron: '0 2 */2 * *' | ||
|
||
jobs: | ||
|
||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
browser: [chrome,firefox,edge] | ||
channel: [dev,beta] | ||
env: | ||
NAME: selenium | ||
BROWSER: ${{ matrix.browser }} | ||
CHANNEL: ${{ matrix.channel }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup environment variables | ||
run: | | ||
export SELENIUM_VERSION=$(grep selenium-server Base/Dockerfile | sed 's/.*-\([^-]*\)\.jar \\/\1/' | head -n 1) | ||
echo "SELENIUM_VERSION="$SELENIUM_VERSION >> $GITHUB_ENV | ||
export BUILD_DATE=$(date '+%Y%m%d') | ||
echo "BUILD_DATE="$BUILD_DATE >> $GITHUB_ENV | ||
export BROWSER_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)" $BROWSER` | ||
echo "BROWSER_CAPS="$BROWSER_CAPS >> $GITHUB_ENV | ||
export CHANNEL_CAPS=`node -p "process.argv[1][0].toUpperCase() + process.argv[1].toString().substring(1)" $CHANNEL` | ||
echo "CHANNEL_CAPS="$CHANNEL_CAPS >> $GITHUB_ENV | ||
echo "BROWSER is $BROWSER" | ||
echo "CHANNEL is $CHANNEL" | ||
echo "SELENIUM_VERSION is $SELENIUM_VERSION" | ||
echo "BUILD_DATE is $BUILD_DATE" | ||
- name: Pull hub and node-base and tag them for faster building and testing | ||
run: | | ||
docker pull $NAME/hub:latest | ||
docker pull $NAME/node-base:latest | ||
docker tag $NAME/hub:latest $NAME/hub:$CHANNEL | ||
docker tag $NAME/node-base:latest $NAME/node-base:$CHANNEL | ||
docker tag $NAME/hub:latest $NAME/hub:"$SELENIUM_VERSION"-"$BUILD_DATE" | ||
docker tag $NAME/node-base:latest $NAME/node-base:"$SELENIUM_VERSION"-"$BUILD_DATE" | ||
- name: Build the Dev/Beta Docker container images | ||
run: | | ||
echo VERSION=$SELENIUM_VERSION make $BROWSER_$CHANNEL standalone_"$BROWSER"_"$CHANNEL" | ||
VERSION=$SELENIUM_VERSION make "$BROWSER"_"$CHANNEL" standalone_"$BROWSER"_"$CHANNEL" | ||
- name: Test the Dev/Beta Docker container images | ||
run: | | ||
export SKIP_BUILD=true | ||
export NAMESPACE=$NAME | ||
VERSION=$CHANNEL ./tests/bootstrap.sh Node$BROWSER_CAPS | ||
VERSION=$CHANNEL ./tests/bootstrap.sh Standalone$BROWSER_CAPS | ||
- name: Login Docker Hub | ||
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" | ||
env: | ||
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
|
||
- name: Deploy Dev/Beta Docker container images | ||
run: | | ||
docker push $NAME/node-$BROWSER:$CHANNEL | ||
docker push $NAME/standalone-$BROWSER:$CHANNEL | ||
if [ "$BROWSER" = "firefox" ]; then | ||
export DRIVER_VERSION_COMMAND="/usr/bin/geckodriver --version | head -n 1" | ||
export BROWSER_VERSION_COMMAND="firefox -version" | ||
elif [ "$BROWSER" = "chrome" ]; then | ||
export DRIVER_VERSION_COMMAND="/usr/bin/chromedriver -version" | ||
export BROWSER_VERSION_COMMAND="google-chrome -version" | ||
elif [ "$BROWSER" = "edge" ]; then | ||
export DRIVER_VERSION_COMMAND="/usr/bin/msedgedriver -version" | ||
export BROWSER_VERSION_COMMAND="microsoft-edge -version" | ||
fi | ||
echo "Push to Docker Hub completed" | ||
echo "$BROWSER_CAPS $CHANNEL_CAPS browser version:" | ||
docker run --rm $NAME/standalone-$BROWSER:$CHANNEL bash -c "$BROWSER_VERSION_COMMAND" | ||
echo "$BROWSER_CAPS $CHANNEL_CAPS WebDriver version:" | ||
docker run --rm $NAME/standalone-$BROWSER:$CHANNEL bash -c "$DRIVER_VERSION_COMMAND" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters