Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoExerciseChecker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
Pipelines
DojoExerciseChecker
Merge requests
!1
Add LICENSE
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Closed
Add LICENSE
licence
into
main
Overview
0
Commits
13
Pipelines
0
Changes
1
Closed
michael.minelli
requested to merge
licence
into
main
1 year ago
Overview
0
Commits
13
Pipelines
0
Changes
1
0
0
Merge request reports
Viewing commit
229ea990
Prev
Next
Show latest version
1 file
+
2
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
229ea990
CI/CD => change "main" branch condition to $CI_DEFAULT_BRANCH
· 229ea990
michael.minelli
authored
1 year ago
.gitlab-ci.yml
+
5
−
5
View file @ 1913d426
Show full file
@@ -4,9 +4,9 @@ variables:
DOCKER_HOST
:
tcp://docker:2375
DOCKER_TLS_CERTDIR
:
DOCKER_DRIVER
:
overlay2
DOCKERFILE
:
Dockerfile_Exerci
c
eChecker
DOCKERFILE
:
Dockerfile_Exerci
s
eChecker
PLATFORMS
:
linux/amd64,linux/arm64/v8
CHECKER_PROJECT_FOLDER
:
Exerci
c
eChecker
CHECKER_PROJECT_FOLDER
:
Exerci
s
eChecker
stages
:
-
build
@@ -36,7 +36,7 @@ build:
script
:
-
apk add curl
-
curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | sh
-
mv .secure_files/env $CHECKER_PROJECT_FOLDER/.env
-
mv .secure_files/env
_$VERSION
$CHECKER_PROJECT_FOLDER/.env
# Need to build for each platform separately because of multi-stage builds (docker buildx don't use cache same way as docker build)
-
>
platform_array=$(echo $PLATFORMS | tr "," "\n");
@@ -47,7 +47,7 @@ build:
# Here docker buildx can use cached images created in previous step
-
docker buildx build --platform $PLATFORMS --file $DOCKERFILE --push --tag $CONTAINER_IMAGE .
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"main"
||
$CI_COMMIT_BRANCH
=~
/^v[0-9]+(\.[0-9]+)*$/'
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH
||
$CI_COMMIT_BRANCH
=~
/^v[0-9]+(\.[0-9]+)*$/'
release-image
:
stage
:
release
@@ -57,4 +57,4 @@ release-image:
-
docker buildx imagetools create $CONTAINER_IMAGE --tag $CI_REGISTRY_IMAGE:$VERSION
-
docker buildx imagetools create $CONTAINER_IMAGE --tag $CI_REGISTRY_IMAGE:latest
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"main"'
\ No newline at end of file
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
\ No newline at end of file
Loading