Skip to content
Snippets Groups Projects
Commit a96a923e authored by Tim Jaacks's avatar Tim Jaacks
Browse files

CI-test: add deploy stages for SoftwareStore and FTP

Rename all stages to uppercase on this occasion, since we're adding
stages with names containing multiple words.
parent 056f1af1
No related branches found
No related tags found
1 merge request!227CI-test: new deploy pipeline
......@@ -161,3 +161,22 @@ workflow:
--sdk-dir=${BUILD_PATH_SDK} \
--output-dir=release
--release-suffix="${RELEASE_SUFFIX}"
# --------------------------------------------------------------------------------------
# Stage: deploy
# --------------------------------------------------------------------------------------
.deploy:
tags:
- deploy
rules:
- when: manual
allow_failure: true
image: instrumentisto/rsync-ssh:alpine3.16-r4
variables:
DEPLOY_SOURCE:
DEPLOY_TARGET:
DEPLOY_TARGET_LINK:
script:
- rsync -rvhP --mkpath ${DEPLOY_SOURCE} ${DEPLOY_TARGET}
- printf "Sucessfully deployed to:\n%s" "${DEPLOY_TARGET_LINK}"
timeout: 60m
......@@ -12,12 +12,14 @@ include:
- common.yml
stages:
- build
- test
- package
- Build
- Test
- Package
- Deploy SoftwareStore
- Deploy FTP
# --------------------------------------------------------------------------------------
# Stage: build
# Stage: Build
# --------------------------------------------------------------------------------------
.build: &build
- cd ${CI_PROJECT_DIR}
......@@ -33,7 +35,7 @@ stages:
- (($DIFF >= -1 && $DIFF <= 1))
build:files:
stage: build
stage: Build
extends:
- .buildbase
tags:
......@@ -53,7 +55,7 @@ build:files:
- files-*
build:echo:
stage: build
stage: Build
tags:
- infrastructure
timeout: 2m
......@@ -63,7 +65,7 @@ build:echo:
- echo "Build successful"
build:check-foo-branch:
stage: build
stage: Build
extends:
- .buildbase
tags:
......@@ -84,7 +86,7 @@ build:check-foo-branch:
fi
.simulate-build:
stage: build
stage: Build
extends:
- .buildbase
tags:
......@@ -128,10 +130,10 @@ simulate-buildsdk-seco-mx6:
- build.env
# --------------------------------------------------------------------------------------
# Stage: test
# Stage: Test
# --------------------------------------------------------------------------------------
.test_simple:
stage: test
stage: Test
rules:
- when: manual
allow_failure: true
......@@ -156,7 +158,7 @@ test:fail:
smoketest:seco-mx6:
extends:
- .test
stage: test
stage: Test
needs: [simulate-build-seco-mx6]
variables:
TEST_REPO_BRANCH: dunfell
......@@ -166,16 +168,80 @@ smoketest:seco-mx6:
CI_PARAM_BUILDJOB: simulate-build-seco-mx6
# --------------------------------------------------------------------------------------
# Stage: package
# Stage: Package
# --------------------------------------------------------------------------------------
package-seco-mx6:
extends: .package-release
stage: package
stage: Package
needs:
- simulate-build-seco-mx6
package-sdk-seco-mx6:
extends: .package-sdk
stage: package
stage: Package
needs:
- simulate-buildsdk-seco-mx6
# --------------------------------------------------------------------------------------
# Stage: Deploy SoftwareStore
# --------------------------------------------------------------------------------------
.deploy-software-store:
extends: .deploy
stage: Deploy SoftwareStore
variables:
# env variables are available via package.env from package job
DEPLOY_SOURCE: release/${RELEASE_NAME}
DEPLOY_TARGET: /artifacts-yocto/Test
DEPLOY_TARGET_LINK: Z:\Development\SoftwareStore\Linux-Yocto\Test\${RELEASE_NAME}
deploy-files:
extends: .deploy-software-store
variables:
GIT_STRATEGY: none
DEPLOY_SOURCE: .
DEPLOY_TARGET: /artifacts-yocto/Test/${CI_JOB_ID}
DEPLOY_TARGET_LINK: Z:\Development\SoftwareStore\Linux-Yocto\Test\${CI_JOB_ID}
needs:
- build:files
deploy-seco-mx6:
extends: .deploy-software-store
needs:
- package-seco-mx6
deploy-sdk-seco-mx6:
extends: .deploy-software-store
needs:
- package-sdk-seco-mx6
# --------------------------------------------------------------------------------------
# Stage: Deploy FTP
# --------------------------------------------------------------------------------------
.deploy-ftp:
extends: .deploy
stage: Deploy FTP
variables:
# env variables are available via package.env from package job
DEPLOY_SOURCE: release/${RELEASE_NAME}
DEPLOY_TARGET: /artifacts-ftp-yocto/Test
DEPLOY_TARGET_LINK: http://support.garz-fricke.com/projects/Linux-Yocto/Test/${RELEASE_NAME}
ftp-files:
extends: .deploy-ftp
variables:
GIT_STRATEGY: none
DEPLOY_SOURCE: .
DEPLOY_TARGET: /artifacts-ftp-yocto/Test/${CI_JOB_ID}
DEPLOY_TARGET_LINK: http://support.garz-fricke.com/projects/Linux-Yocto/Test/${CI_JOB_ID}
needs:
- build:files
ftp-seco-mx6:
extends: .deploy-ftp
needs:
- package-seco-mx6
ftp-sdk-seco-mx6:
extends: .deploy-ftp
needs:
- package-sdk-seco-mx6
......@@ -220,6 +220,7 @@ def main():
# Store pathes and other stuff in environment variable file
with open("package.env", "w", encoding="utf-8") as env_file:
env_file.write("RELEASE_NAME={}\n".format(release_name))
env_file.write("VERSION={}\n".format(version))
env_file.write("MACHINE={}\n".format(machine))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment