Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GHC for pandoc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Glasgow Haskell Compiler
GHC for pandoc
Commits
08a9979b
Verified
Commit
08a9979b
authored
2 years ago
by
Olivier Benz
Browse files
Options
Downloads
Patches
Plain Diff
Refactor .gitlab-ci.yml
- Update latest Dockerfile
parent
ad89fe3b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+27
-23
27 additions, 23 deletions
.gitlab-ci.yml
latest.Dockerfile
+12
-6
12 additions, 6 deletions
latest.Dockerfile
with
39 additions
and
29 deletions
.gitlab-ci.yml
+
27
−
23
View file @
08a9979b
...
...
@@ -9,7 +9,7 @@
if [[ $CI_COMMIT_BRANCH == "master" ]]; then
export CI_APP_TAG=${CI_APP_TAG:-latest}
elif [[ $CI_COMMIT_BRANCH == "freeze-version" ]]; then
export CI_APP_TAG=${CI_APP_TAG:-
9.2.2
}
export CI_APP_TAG=${CI_APP_TAG:-
$GHC_VERSION
}
else
export CI_APP_TAG=${CI_APP_TAG:-$CI_COMMIT_SHA}
fi
...
...
@@ -17,9 +17,7 @@
echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER
--password-stdin $CI_REGISTRY
-
>
export VERSION_MAJ_MIN_PAT=`sed -n
"s|.*GHC_VERSION_BUILD:-\([[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\).*|\1|p"
$CI_APP_TAG.Dockerfile | head -1`
export VERSION_MAJ_MIN_PAT=$GHC_VERSION
export VERSION_MAJ_MIN=`echo $VERSION_MAJ_MIN_PAT |
sed -n "s|\([[:digit:]]\+\.[[:digit:]]\+\).*|\1|p"`
...
...
@@ -35,6 +33,8 @@
variables
:
DOCKER_DRIVER
:
overlay2
DOCKER_TLS_CERTDIR
:
"
/certs"
GHC_VERSION
:
"
9.2.3"
CABAL_VERSION
:
"
3.6.2.0"
before_script
:
-
*before-script-build
...
...
@@ -45,12 +45,13 @@ build:latest-linux-amd64:
-
os:linux
script
:
-
>
docker build -t $CI_APP_REPO:$CI_APP_TAG-linux-amd64
docker build
--build-arg GHC_VERSION
--build-arg CABAL_VERSION
-t $CI_APP_REPO:$CI_APP_TAG-linux-amd64
-t $CI_APP_REPO:$VERSION_MAJ_MIN_PAT-linux-amd64
-f $CI_APP_TAG.Dockerfile .
-
|
docker push $CI_APP_REPO:$CI_APP_TAG-linux-amd64
docker push $CI_APP_REPO:$VERSION_MAJ_MIN_PAT-linux-amd64
-f latest.Dockerfile .
-
docker push -a $CI_APP_REPO
rules
:
-
if
:
$CI_COMMIT_BRANCH == "master" && $CI_BUILD_PLATFORMS =~ /(linux\/amd64)/
changes
:
...
...
@@ -63,12 +64,13 @@ build:latest-linux-arm64v8:
-
os:linux
script
:
-
>
docker build -t $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
docker build
--build-arg GHC_VERSION
--build-arg CABAL_VERSION
-t $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
-t $CI_APP_REPO:$VERSION_MAJ_MIN_PAT-linux-arm64v8
-f $CI_APP_TAG.Dockerfile .
-
|
docker push $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
docker push $CI_APP_REPO:$VERSION_MAJ_MIN_PAT-linux-arm64v8
-f latest.Dockerfile .
-
docker push -a $CI_APP_REPO
rules
:
-
if
:
$CI_COMMIT_BRANCH == "master" && $CI_BUILD_PLATFORMS =~ /(linux\/arm64\/v8)/
changes
:
...
...
@@ -81,13 +83,14 @@ build:version-linux-amd64:
-
os:linux
script
:
-
>
docker build -t $CI_APP_REPO:$CI_APP_TAG-linux-amd64
-f $CI_APP_TAG.Dockerfile .
-
docker push $CI_APP_REPO:$CI_APP_TAG-linux-amd64
docker build
-t $CI_APP_REPO:$CI_APP_TAG-linux-amd64
-f $GHC_VERSION.Dockerfile .
-
docker push -a $CI_APP_REPO
rules
:
-
if
:
$CI_COMMIT_BRANCH == "freeze-version" && $CI_BUILD_PLATFORMS =~ /(linux\/amd64)/
changes
:
-
9.2.2
.Dockerfile
-
$GHC_VERSION
.Dockerfile
build:version-linux-arm64v8
:
extends
:
.build
...
...
@@ -96,13 +99,14 @@ build:version-linux-arm64v8:
-
os:linux
script
:
-
>
docker build -t $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
-f $CI_APP_TAG.Dockerfile .
-
docker push $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
docker build
-t $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
-f $GHC_VERSION.Dockerfile .
-
docker push -a $CI_APP_REPO
rules
:
-
if
:
$CI_COMMIT_BRANCH == "freeze-version" && $CI_BUILD_PLATFORMS =~ /(linux\/arm64\/v8)/
changes
:
-
9.2.2
.Dockerfile
-
$GHC_VERSION
.Dockerfile
build-manifest:latest-linux-multiarch
:
extends
:
.build
...
...
@@ -163,4 +167,4 @@ build-manifest:version-linux-multiarch:
rules
:
-
if
:
$CI_COMMIT_BRANCH == "freeze-version"
changes
:
-
9.2.2
.Dockerfile
-
$GHC_VERSION
.Dockerfile
This diff is collapsed.
Click to expand it.
latest.Dockerfile
+
12
−
6
View file @
08a9979b
ARG
GHC_VERSION
_BUILD
ARG
CABAL_VERSION
_BUILD
ARG
GHC_VERSION
ARG
CABAL_VERSION
FROM
registry.gitlab.b-data.ch/ghc/ghc4pandoc:9.0.2
as
bootstrap
ENV
GHC_VERSION=${GHC_VERSION_BUILD:-9.2.3}
ENV
CABAL_VERSION=${CABAL_VERSION_BUILD:-3.6.2.0}
ARG
GHC_VERSION
ARG
CABAL_VERSION
ENV
GHC_VERSION=${GHC_VERSION} \
CABAL_VERSION=${CABAL_VERSION}
RUN
apk upgrade
--no-cache
\
&&
apk add
--update
--no-cache
\
...
...
@@ -63,8 +66,11 @@ LABEL org.label-schema.license="MIT" \
org.label-schema.vcs-url="https://gitlab.b-data.ch/ghc/ghc4pandoc" \
maintainer="Olivier Benz <olivier.benz@b-data.ch>"
ENV
GHC_VERSION=${GHC_VERSION_BUILD:-9.2.3}
ENV
CABAL_VERSION=${CABAL_VERSION_BUILD:-3.6.2.0}
ARG
GHC_VERSION
ARG
CABAL_VERSION
ENV
GHC_VERSION=${GHC_VERSION} \
CABAL_VERSION=${CABAL_VERSION}
RUN
apk upgrade
--no-cache
\
&&
apk add
--update
--no-cache
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment