image: docker services: - docker:dind variables: GITLAB_SHARED_DIND_DIR: /builds/$CI_PROJECT_PATH/shared GIT_SUBMODULE_STRATEGY: normal GIT_FETCH_EXTRA_FLAGS: --tags # S3_BUILD_DIRECTORY: kasmvnc/${CI_COMMIT_SHA} S3_BUILD_DIRECTORY: kasmvnc/159d7527955f131e096cf1602b7f9f66cc5d66cb stages: - check_if_build_was_already_uploaded_for_the_commit - build - upload check_if_build_was_already_uploaded_for_the_commit: stage: check_if_build_was_already_uploaded_for_the_commit script: - apk add bash - apk add curl # - TODO: Try uploading and fail if the file .lock exists. - .ci/check_if_build_was_already_uploaded .prepare_build: &prepare_build - ls -l - pwd - apk add bash - mkdir -p "$GITLAB_SHARED_DIND_DIR" && chmod 777 "$GITLAB_SHARED_DIND_DIR" .prepare_artfacts: &prepare_artfacts - mkdir output - cp -r builder/build/* output/ - rm output/*.tar.gz build_ubuntu_bionic: stage: build before_script: - *prepare_build after_script: - *prepare_artfacts script: - bash builder/build-package ubuntu bionic artifacts: paths: - output/ build_ubuntu_bionic_libjpeg_turbo: stage: build before_script: - *prepare_build after_script: - *prepare_artfacts script: - bash builder/build-package ubuntu bionic +libjpeg-turbo_latest artifacts: paths: - output/ build_ubuntu_focal: stage: build before_script: - *prepare_build after_script: - *prepare_artfacts script: - bash builder/build-package ubuntu focal; artifacts: paths: - output/ build_debian_buster: stage: build before_script: - *prepare_build after_script: - *prepare_artfacts script: - bash builder/build-package debian buster; artifacts: paths: - output/ build_debian_bullseye: stage: build before_script: - *prepare_build after_script: - *prepare_artfacts script: - bash builder/build-package debian bullseye; artifacts: paths: - output/ build_kali_rolling: stage: build before_script: - *prepare_build after_script: - *prepare_artfacts script: - bash builder/build-package kali kali-rolling; artifacts: paths: - output/ build_centos7: stage: build before_script: - *prepare_build after_script: - *prepare_artfacts script: - bash builder/build-package centos core artifacts: paths: - output/ upload: stage: upload image: ubuntu:focal before_script: - . .ci/upload.sh script: - prepare_to_run_scripts_and_s3_uploads - export RELEASE_VERSION=$(.ci/next_release_version "$CI_COMMIT_REF_NAME") - for package in `find output/ -type f -name '*.deb' -or -name '*.rpm'`; do prepare_upload_filename "$package"; echo; echo "File to upload $upload_filename"; upload_to_s3 "$package" "$upload_filename"; done