Compare commits
12 Commits
release/1.
...
KASM-1910-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f1f88d6b2 | ||
|
|
2f91fbd235 | ||
|
|
3500489bb8 | ||
|
|
22362e73ad | ||
|
|
0a1f705637 | ||
|
|
02dc1a4b53 | ||
|
|
33dd45b6e5 | ||
|
|
c5d61ca63e | ||
|
|
bb2dc1787d | ||
|
|
2bdfd0f70a | ||
|
|
c9a4319ca7 | ||
|
|
b367d1711d |
14
.ci/check_if_build_was_already_uploaded
Executable file
14
.ci/check_if_build_was_already_uploaded
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
check_directory_exists() {
|
||||||
|
local remote_dir="$1"
|
||||||
|
|
||||||
|
curl --output /dev/null --silent --head --fail "$remote_dir"
|
||||||
|
}
|
||||||
|
|
||||||
|
S3_URL="https://${S3_BUCKET}.s3.amazonaws.com/${S3_BUILD_DIRECTORY}/";
|
||||||
|
if check_directory_exists "$S3_URL"; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
is_kasmvnc() {
|
is_kasmvnc_package() {
|
||||||
local package="$1";
|
local package="$1";
|
||||||
|
|
||||||
echo "$package" | grep -q 'kasmvncserver_'
|
echo "$package" | grep -E -q 'kasmvncserver_|rpm'
|
||||||
}
|
}
|
||||||
|
|
||||||
function prepare_upload_filename() {
|
function prepare_upload_filename() {
|
||||||
local package="$1";
|
local package="$1";
|
||||||
|
|
||||||
if ! is_kasmvnc "$package"; then
|
if ! is_kasmvnc_package "$package"; then
|
||||||
export upload_filename="$package"
|
export upload_filename="$package"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -6,11 +6,22 @@ variables:
|
|||||||
GITLAB_SHARED_DIND_DIR: /builds/$CI_PROJECT_PATH/shared
|
GITLAB_SHARED_DIND_DIR: /builds/$CI_PROJECT_PATH/shared
|
||||||
GIT_SUBMODULE_STRATEGY: normal
|
GIT_SUBMODULE_STRATEGY: normal
|
||||||
GIT_FETCH_EXTRA_FLAGS: --tags
|
GIT_FETCH_EXTRA_FLAGS: --tags
|
||||||
|
# S3_BUILD_DIRECTORY: kasmvnc/${CI_COMMIT_SHA}
|
||||||
|
S3_BUILD_DIRECTORY: kasmvnc/159d7527955f131e096cf1602b7f9f66cc5d66cb
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- check_if_build_was_already_uploaded_for_the_commit
|
||||||
- build
|
- build
|
||||||
- upload
|
- 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
|
.prepare_build: &prepare_build
|
||||||
- ls -l
|
- ls -l
|
||||||
- pwd
|
- pwd
|
||||||
@@ -112,7 +123,6 @@ upload:
|
|||||||
before_script:
|
before_script:
|
||||||
- . .ci/upload.sh
|
- . .ci/upload.sh
|
||||||
script:
|
script:
|
||||||
- export S3_BUILD_DIRECTORY="kasmvnc/${CI_COMMIT_SHA}"
|
|
||||||
- prepare_to_run_scripts_and_s3_uploads
|
- prepare_to_run_scripts_and_s3_uploads
|
||||||
- export RELEASE_VERSION=$(.ci/next_release_version "$CI_COMMIT_REF_NAME")
|
- export RELEASE_VERSION=$(.ci/next_release_version "$CI_COMMIT_REF_NAME")
|
||||||
- for package in `find output/ -type f -name '*.deb' -or -name '*.rpm'`; do
|
- for package in `find output/ -type f -name '*.deb' -or -name '*.rpm'`; do
|
||||||
|
|||||||
Reference in New Issue
Block a user