Loading .gitlab-ci.yml +26 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ variables: ARCHIVE_NAME: "org.etsi.mts.tdl.updatesite-1.0.0-SNAPSHOT.zip" SITE_ARCHIVE: "${SITE_LOCATION}/${ARCHIVE_NAME}" SITE_PATH: "${SITE_LOCATION}/repository/" REPO_PREFIX: "https://labs.etsi.org/rep/top/ide/-/jobs" REPO_PATH: "artifacts/raw/updatesite/org.etsi.mts.tdl.updatesite/target/repository/" PACKAGE_NAME: "TOP IDE Interim Build" # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work. MAVEN_OPTS: >- Loading Loading @@ -129,10 +131,15 @@ build-job: # This job runs in the build stage, which runs first. - !reference [.default_rules, rules] script: - echo "Compiling the code..." - echo "BUILD_JOB_ID=$CI_JOB_ID" >> build.env - cat build.env - cd org.etsi.mts.tdl.parent - mvn clean install - echo "Compile complete." artifacts: expire_in: 7 days reports: dotenv: build.env paths: - $SITE_ARCHIVE - $SITE_PATH Loading Loading @@ -169,6 +176,7 @@ prepare: - echo "EXTRA_DESCRIPTION=automatic-release" >> variables.env - echo "VERSION=$VERSION" >> variables.env - echo "PACKAGE_REGISTRY_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ide/${VERSION}" >> variables.env - echo "PACKAGE_LATEST_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ide/latest" >> variables.env - cat variables.env artifacts: reports: Loading @@ -186,9 +194,16 @@ upload: rules: - !reference [.default_rules, rules] script: - echo $BUILD_JOB_ID - echo "${PACKAGE_REGISTRY_URL}/${ARCHIVE_NAME}" - | curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${SITE_ARCHIVE} ${PACKAGE_REGISTRY_URL}/${ARCHIVE_NAME} # - | # curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${SITE_ARCHIVE} ${PACKAGE_LATEST_URL}/${ARCHIVE_NAME} # - | # cd ${SITE_LOCATION} && find repository/ -type f -exec echo curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file {} ${PACKAGE_LATEST_URL}/{} \; && cd ~ # - | # cd ${SITE_LOCATION} && find repository/ -type f -exec curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file {} ${PACKAGE_LATEST_URL}/{} \; # - | # curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/${MACOS_GUI_JAR} ${PACKAGE_REGISTRY_URL}/${MACOS_GUI_JAR} # - | Loading @@ -204,12 +219,21 @@ release: needs: - job: prepare artifacts: true - job: build-job artifacts: true rules: - !reference [.default_rules, rules] script: # unpack latest? # --description "Published automatically, permalink for installation (valid for 7 days) at https://labs.etsi.org/rep/top/ide/-/releases/permalink/latest/downloads/repository." - echo $BUILD_JOB_ID - | release-cli create --name "Release $VERSION" --tag-name $VERSION --ref $CI_COMMIT_SHA \ --assets-link "{\"name\":\"${PACKAGE_NAME}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${ARCHIVE_NAME}\"}" \ release-cli create --name "Release $VERSION" \ --tag-name $VERSION \ --ref $CI_COMMIT_SHA \ --assets-link "{\"name\":\"${PACKAGE_NAME}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${ARCHIVE_NAME}\",\"filepath\":\"/repository-archive\"}" \ --assets-link "{\"name\":\"${PACKAGE_NAME} (latest repository (exipres in 7 days))\",\"url\":\"${REPO_PREFIX}/${BUILD_JOB_ID}/${REPO_PATH}\",\"filepath\":\"/repository\"}" \ # --assets-link "{\"name\":\"${PACKAGE_NAME} (latest)\",\"url\":\"${PACKAGE_LATEST_URL}/${ARCHIVE_NAME}\"}" \ # --assets-link "{\"name\":\"${MACOS_GUI_JAR}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${MACOS_GUI_JAR}\"}" \ # --assets-link "{\"name\":\"${WINDOWS_GUI_JAR}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${WINDOWS_GUI_JAR}\"}" \ # --assets-link "{\"name\":\"${CLI_JAR}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${CLI_JAR}\"}" \ Loading Loading
.gitlab-ci.yml +26 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ variables: ARCHIVE_NAME: "org.etsi.mts.tdl.updatesite-1.0.0-SNAPSHOT.zip" SITE_ARCHIVE: "${SITE_LOCATION}/${ARCHIVE_NAME}" SITE_PATH: "${SITE_LOCATION}/repository/" REPO_PREFIX: "https://labs.etsi.org/rep/top/ide/-/jobs" REPO_PATH: "artifacts/raw/updatesite/org.etsi.mts.tdl.updatesite/target/repository/" PACKAGE_NAME: "TOP IDE Interim Build" # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work. MAVEN_OPTS: >- Loading Loading @@ -129,10 +131,15 @@ build-job: # This job runs in the build stage, which runs first. - !reference [.default_rules, rules] script: - echo "Compiling the code..." - echo "BUILD_JOB_ID=$CI_JOB_ID" >> build.env - cat build.env - cd org.etsi.mts.tdl.parent - mvn clean install - echo "Compile complete." artifacts: expire_in: 7 days reports: dotenv: build.env paths: - $SITE_ARCHIVE - $SITE_PATH Loading Loading @@ -169,6 +176,7 @@ prepare: - echo "EXTRA_DESCRIPTION=automatic-release" >> variables.env - echo "VERSION=$VERSION" >> variables.env - echo "PACKAGE_REGISTRY_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ide/${VERSION}" >> variables.env - echo "PACKAGE_LATEST_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ide/latest" >> variables.env - cat variables.env artifacts: reports: Loading @@ -186,9 +194,16 @@ upload: rules: - !reference [.default_rules, rules] script: - echo $BUILD_JOB_ID - echo "${PACKAGE_REGISTRY_URL}/${ARCHIVE_NAME}" - | curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${SITE_ARCHIVE} ${PACKAGE_REGISTRY_URL}/${ARCHIVE_NAME} # - | # curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${SITE_ARCHIVE} ${PACKAGE_LATEST_URL}/${ARCHIVE_NAME} # - | # cd ${SITE_LOCATION} && find repository/ -type f -exec echo curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file {} ${PACKAGE_LATEST_URL}/{} \; && cd ~ # - | # cd ${SITE_LOCATION} && find repository/ -type f -exec curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file {} ${PACKAGE_LATEST_URL}/{} \; # - | # curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/${MACOS_GUI_JAR} ${PACKAGE_REGISTRY_URL}/${MACOS_GUI_JAR} # - | Loading @@ -204,12 +219,21 @@ release: needs: - job: prepare artifacts: true - job: build-job artifacts: true rules: - !reference [.default_rules, rules] script: # unpack latest? # --description "Published automatically, permalink for installation (valid for 7 days) at https://labs.etsi.org/rep/top/ide/-/releases/permalink/latest/downloads/repository." - echo $BUILD_JOB_ID - | release-cli create --name "Release $VERSION" --tag-name $VERSION --ref $CI_COMMIT_SHA \ --assets-link "{\"name\":\"${PACKAGE_NAME}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${ARCHIVE_NAME}\"}" \ release-cli create --name "Release $VERSION" \ --tag-name $VERSION \ --ref $CI_COMMIT_SHA \ --assets-link "{\"name\":\"${PACKAGE_NAME}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${ARCHIVE_NAME}\",\"filepath\":\"/repository-archive\"}" \ --assets-link "{\"name\":\"${PACKAGE_NAME} (latest repository (exipres in 7 days))\",\"url\":\"${REPO_PREFIX}/${BUILD_JOB_ID}/${REPO_PATH}\",\"filepath\":\"/repository\"}" \ # --assets-link "{\"name\":\"${PACKAGE_NAME} (latest)\",\"url\":\"${PACKAGE_LATEST_URL}/${ARCHIVE_NAME}\"}" \ # --assets-link "{\"name\":\"${MACOS_GUI_JAR}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${MACOS_GUI_JAR}\"}" \ # --assets-link "{\"name\":\"${WINDOWS_GUI_JAR}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${WINDOWS_GUI_JAR}\"}" \ # --assets-link "{\"name\":\"${CLI_JAR}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${CLI_JAR}\"}" \ Loading