mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
CLD-5698 - Add e2e smoketests (#23590)
* Prepare: run E2E smoketests with GitHub actions (#23301) * Port E2E testing scripts from cypress-ui-automation * Move server to docker-compose, move E2E images to ecrpublic * Integrate General channel renaming, fixes * Add local automation-dashboard Add readme * Add E2E smoketests * Bump postgres to 12 * Fully rely on mattermostdevelopment images --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com> Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
This commit is contained in:
36
server/scripts/mirror-docker-images.json
Normal file
36
server/scripts/mirror-docker-images.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"postgres": {
|
||||
"10": "postgres:10@sha256:7a484b11fcabd39596b1bf08780cdb61fa9b0d8bfad0844dbdce3a6922df95d1",
|
||||
"12": "postgres:12@sha256:cc7a021d9aff3aa02788d35c27a5cc32d4790ad92d72232a6be75b76ab7d79db"
|
||||
},
|
||||
"mysql": {
|
||||
"5.7.12": "mysql/mysql-server:5.7.12@sha256:3f0d90736a3298bb04965db697a3a85f1df1480da49eafd256be1ea2b9b5337e"
|
||||
},
|
||||
"minio": {
|
||||
"RELEASE.2019-10-11T00-38-09Z-1": "minio/minio:RELEASE.2019-10-11T00-38-09Z@sha256:0d02f16a1662653f9b961211b21ed7de04bf04492f44c2b7594bacbfcc519eb5"
|
||||
},
|
||||
"inbucket": {
|
||||
"3.0.0": "inbucket/inbucket:3.0.0@sha256:1f10a0efea694592c06799c729aee1d6d71c9a4f72b73031d4a426ef5f26dfc1"
|
||||
},
|
||||
"openldap": {
|
||||
"1.4.0": "osixia/openldap:1.4.0@sha256:d5b2f2b816b25a1b57033b34f5d48c91cc3161a7d041811a9032604030bad9db"
|
||||
},
|
||||
"keycloak": {
|
||||
"10.0.2": "jboss/keycloak:10.0.2@sha256:3720b5ace316b5790a58ce838f46e8cd44cedbdb7e35d3866311ddc5a5e71466"
|
||||
},
|
||||
"dejavu": {
|
||||
"3.4.2": "appbaseio/dejavu:3.4.2@sha256:8f2f4d45565da53c4235495737fff3921d302955daeb2f53a433c7b0e2044951"
|
||||
},
|
||||
"prometheus": {
|
||||
"v2.27.1": "prom/prometheus:v2.27.1@sha256:5accb68b56ba452e449a5e552411acaeabbbe0f087acf19a1157ce3dd10a8bed"
|
||||
},
|
||||
"grafana": {
|
||||
"8.0.1": "grafana/grafana:8.0.1@sha256:1c3e2fc7896adf9e33be5d062c08066087cb556f63b0a95f8aefe92bd37a6f38"
|
||||
},
|
||||
"cypress-browsers-public": {
|
||||
"node16.14.2-slim-chrome100-ff99-edge": "cypress/browsers:node16.14.2-slim-chrome100-ff99-edge@sha256:f8459ee677ce356eff64698095fbdf48eb9ab018fc5eb0d30c07ba23884edace"
|
||||
},
|
||||
"golang": {
|
||||
"1.19.5": "golang:1.19.5@sha256:bb9811fad43a7d6fd2173248d8331b2dcf5ac9af20976b1937ecd214c5b8c383"
|
||||
}
|
||||
}
|
||||
34
server/scripts/mirror-docker-images.sh
Executable file
34
server/scripts/mirror-docker-images.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
set -eu -o pipefail
|
||||
|
||||
# Assert that IMAGE_FILE var is given, and that the file exists
|
||||
: ${IMAGES_FILE}
|
||||
[ -f ${IMAGES_FILE} ] || {
|
||||
echo "Error: images spec file $IMAGES_FILE does not exist. Aborting." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
DRY_RUN=${DRY_RUN:-yes}
|
||||
log () { echo "[$(date -Is)]" $*; }
|
||||
get_image_specs_per_line () {
|
||||
jq -c '. as $images | keys[] | . as $image | $images[.] | keys[] | {dst_img_name: $image, dst_img_tag: ., src_img: $images[$image][.]}' <$IMAGES_FILE
|
||||
}
|
||||
|
||||
log "Pusing images from given spec file: $IMAGES_FILE"
|
||||
log "Content of the spec file:"
|
||||
cat $IMAGES_FILE
|
||||
get_image_specs_per_line | while read IMAGE_SPEC; do
|
||||
DST_IMG_NAME=$(jq -r '.dst_img_name' <<<$IMAGE_SPEC)
|
||||
DST_IMG_TAG=$(jq -r '.dst_img_tag' <<<$IMAGE_SPEC)
|
||||
SOURCE_IMAGE=$(jq -r '.src_img' <<<$IMAGE_SPEC)
|
||||
DESTINATION_IMAGE=mattermostdevelopment/mirrored-${DST_IMG_NAME}:${DST_IMG_TAG}
|
||||
if [ "${DRY_RUN,,}" = "no" ]; then
|
||||
log "Pushing image: $SOURCE_IMAGE ---> $DESTINATION_IMAGE"
|
||||
docker pull $SOURCE_IMAGE
|
||||
docker tag $SOURCE_IMAGE $DESTINATION_IMAGE
|
||||
docker push $DESTINATION_IMAGE
|
||||
else
|
||||
log "Pushing image: $SOURCE_IMAGE ---> $DESTINATION_IMAGE (dry run mode, set the DRY_RUN=no env var to disable)"
|
||||
fi
|
||||
done
|
||||
log "All images pushed."
|
||||
Reference in New Issue
Block a user