diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1db93d0..6ec15b1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -123,3 +123,11 @@ release: --assets-link "{\"name\":\"c4k-jitsi.js\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-jitsi.js\"}" \ --assets-link "{\"name\":\"c4k-jitsi.js.sha256\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-jitsi.js.sha256\"}" \ --assets-link "{\"name\":\"c4k-jitsi.js.sha512\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-jitsi.js.sha512\"}" \ + +jitsi-image-test-publish: + image: domaindrivenarchitecture/devops-build:latest + stage: image + rules: + - if: '$CI_COMMIT_TAG != null' + script: + - cd infrastructure/docker-jitsi-web && pyb image test publish \ No newline at end of file diff --git a/infrastructure/docker-jitsi-web/build.py b/infrastructure/docker-jitsi-web/build.py index 99ce3c3..5d7c5db 100644 --- a/infrastructure/docker-jitsi-web/build.py +++ b/infrastructure/docker-jitsi-web/build.py @@ -21,8 +21,11 @@ def initialize(project): dockerhub_password = environ.get('DOCKERHUB_PASSWORD') if not dockerhub_password: dockerhub_password = gopass_password_from_path('meissa/web/docker.com') + tag = environ.get('CI_COMMIT_TAG') + if not tag: + tag = get_tag_from_latest_commit() config = create_devops_docker_build_config( - stage, PROJECT_ROOT_PATH, MODULE, dockerhub_user, dockerhub_password) + stage, PROJECT_ROOT_PATH, MODULE, dockerhub_user, dockerhub_password, docker_publish_tag=tag) build = MyBuild(project, config) build.initialize_build_dir() diff --git a/infrastructure/docker-jitsi-web/test/Dockerfile b/infrastructure/docker-jitsi-web/test/Dockerfile new file mode 100644 index 0000000..ddcb727 --- /dev/null +++ b/infrastructure/docker-jitsi-web/test/Dockerfile @@ -0,0 +1,8 @@ +FROM c4k-jitsi + +RUN curl -L -o /tmp/serverspec.jar \ + https://github.com/DomainDrivenArchitecture/dda-serverspec-crate/releases/download/1.3.4/dda-serverspec-standalone.jar + +COPY serverspec.edn /tmp/serverspec.edn + +RUN java -jar /tmp/serverspec.jar /tmp/serverspec.edn -v diff --git a/infrastructure/docker-jitsi-web/test/serverspec.edn b/infrastructure/docker-jitsi-web/test/serverspec.edn new file mode 100644 index 0000000..86fef1a --- /dev/null +++ b/infrastructure/docker-jitsi-web/test/serverspec.edn @@ -0,0 +1 @@ +{:file [{:path "/defaults/settings-config.js"}]} diff --git a/package.json b/package.json index 62bd8ad..9ad5eaa 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "c4k-jitsi", "description": "Generate c4k yaml for a jitsi deployment.", "author": "meissa GmbH", - "version": "1.1.2", + "version": "1.2.0", "homepage": "https://gitlab.com/domaindrivenarchitecture/c4k-jitsi#readme", "repository": "https://www.npmjs.com/package/c4k-jitsi", "license": "APACHE2", diff --git a/project.clj b/project.clj index efb6b93..ff58f36 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject org.domaindrivenarchitecture/c4k-jitsi "1.1.2" +(defproject org.domaindrivenarchitecture/c4k-jitsi "1.2.0-SNAPSHOT" :description "jitsi c4k-installation package" :url "https://domaindrivenarchitecture.org" :license {:name "Apache License, Version 2.0"