Verified Commit 0d3b190b authored by Arie Peterson's avatar Arie Peterson 🐚
Browse files

Change default image tags to 0.1.0, also push tags from CI

parent 85ac49b0
Pipeline #9764 passed with stage
in 50 seconds
---
include:
- remote: 'https://open.greenhost.net/openappstack/openappstack/-/raw/master/.gitlab/ci_templates/kaniko.yml'
# A Gitlab CI job template for building docker images using kaniko.
#
# Required environment variables:
# - KANIKO_BUILD_IMAGENAME: Build/target image name.
# Images will be named like
# `open.greenhost.net:4567/GROUP/PROJECT/KANIKO_BUILD_IMAGENAME:TAG`
# , where TAG is the CI_COMMIT_REF_SLUG, and also the CI_COMMIT_TAG if set.
#
# Optional environment variables:
# - KANIKO_CONTEXT: The subdir which holds the Dockerfile, leave unset if
# the Dockerfile is located at root level of the project.
.kaniko_build:
stage: build
image:
# We need a shell to provide the registry credentials, so we need to use the
# kaniko debug image (https://github.com/GoogleContainerTools/kaniko#debug-image)
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- if [ -n "${CI_COMMIT_TAG}" ]; then export KANIKO_EXTRA_TAG="--destination ${CI_REGISTRY_IMAGE}/${KANIKO_BUILD_IMAGENAME}:${CI_COMMIT_TAG}"; else export KANIKO_EXTRA_TAG=""; fi
- /kaniko/executor --cache=true --context ${CI_PROJECT_DIR}/${KANIKO_CONTEXT:-.} --dockerfile ${CI_PROJECT_DIR}/${KANIKO_CONTEXT:-.}/Dockerfile --destination ${CI_REGISTRY_IMAGE}/${KANIKO_BUILD_IMAGENAME}:${CI_COMMIT_REF_SLUG} ${KANIKO_EXTRA_TAG}
stages:
- build
- tag
default:
image: "${CI_REGISTRY_IMAGE}/${KANIKO_BUILD_IMAGENAME}:${CI_COMMIT_REF_SLUG}"
......@@ -16,10 +38,15 @@ build-wp-cli:
extends: .kaniko_build
tags:
- docker
only:
changes:
- wp-cli-docker/**/**/*
- .gitlab-ci.yml
# Run this job if files have changed that are used when building the docker
# image, or when the commit is a tag.
rules:
- changes:
- wp-cli-docker/**/**/*
- .gitlab-ci.yml
when: on_success
- if: '$CI_COMMIT_TAG'
when: on_success
build-wp:
stage: build
......@@ -29,7 +56,12 @@ build-wp:
extends: .kaniko_build
tags:
- docker
only:
changes:
- wp-docker/**
- .gitlab-ci.yml
# Run this job if files have changed that are used when building the docker
# image, or when the commit is a tag.
rules:
- changes:
- wp-docker/**
- .gitlab-ci.yml
when: on_success
- if: '$CI_COMMIT_TAG'
when: on_success
......@@ -2,5 +2,7 @@ apiVersion: v1
appVersion: "5.2.3"
description: WordPress with a replicated MariaDB backend
name: wordpress
# Please only change the chart version as part of the release procedure: see
# RELEASING.md
version: 0.1.0
icon: https://make.wordpress.org/design/files/2016/09/WordPress-logotype-wmark.png
## Release procedure
When releasing a new version of the wordpress-helm chart, please remember to do
the following:
* change the chart version in `Chart.yaml`;
* change the default `image.tag` and `initImage.tag` in `values.yaml` to the new
version (e.g., "0.1.0");
* create a git tag for the new version (e.g., "0.1.0") and push it to Gitlab
(any branch will do); the CI will create and push docker images tagged by that
same version string.
......@@ -167,12 +167,12 @@ wpSalts: {}
image:
repository: docker.greenhost.net/open/wordpress-helm/wordpress
tag: master
tag: 0.1.0
pullPolicy: Always
initImage:
repository: docker.greenhost.net/open/wordpress-helm/wordpress-cli-ansible
tag: master
tag: 0.1.0
pullPolicy: Always
imagePullSecretName: greenhost-registry-pull
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment