Compare commits

..

15 Commits

Author SHA1 Message Date
6ff4c2d834 Merge pull request 'test' (#16) from test into stable
Reviewed-on: #16
2023-06-22 13:55:16 +02:00
d550141b92 fix(patches): use correct patch file name 2023-06-22 13:55:16 +02:00
4f60cdebdb fix(patches): adding missing patch 2023-06-22 13:46:39 +02:00
4fbe432ebf Merge pull request 'test' (#10) from test into stable
Reviewed-on: #10
2023-06-22 12:12:23 +02:00
80d03bf7e8 Merge pull request 'dev' (#9) from dev into test
Reviewed-on: #9
2023-06-22 12:12:01 +02:00
5eb1f4b610 Merge pull request 'fix(iniapp): using default stable branch' (#8) from fix/iniapp into dev
Reviewed-on: #8
2023-06-22 12:11:27 +02:00
0e16682b0f fix(iniapp): using default stable branch 2023-06-22 12:10:46 +02:00
a0fe89e310 Merge pull request 'test' (#7) from test into stable
Reviewed-on: #7
2023-06-22 12:06:32 +02:00
6015496fa0 Merge pull request 'dev' (#6) from dev into test
Reviewed-on: #6
2023-06-22 12:06:06 +02:00
61c8b8d50b Merge pull request 'fix(k8s): naming variables correctly for nginx container' (#4) from fix/nginx into dev
Reviewed-on: #4
2023-06-22 12:02:55 +02:00
8af5526c7a fix(k8s): naming variables correctly for nginx container 2023-06-22 12:01:48 +02:00
39f7bc12b5 Merge pull request 'test' (#3) from test into stable
Reviewed-on: #3
2023-06-22 11:46:59 +02:00
96884e4e56 Merge pull request 'dev' (#2) from dev into test
Reviewed-on: #2
2023-06-22 11:46:33 +02:00
3f098b691a Merge pull request 'feat(jenkins): adding new default jenkins configuration' (#1) from feat/jenkins into dev
Reviewed-on: #1
2023-06-22 11:46:05 +02:00
aeb5a75cf1 feat(jenkins): adding new default jenkins configuration 2023-06-21 09:43:13 +02:00
6 changed files with 19 additions and 26 deletions

12
Jenkinsfile vendored
View File

@ -8,25 +8,17 @@ symfonyAppPipeline('ubuntu:22.04', [
'hooks': [
// Run docker image build, verification and publication stages
'postSymfonyAppPipeline': {
stage('Build and publish hydra-dispatcher image') {
stage('Build and publish docker images') {
// Retrieve current tag
String currentTag = sh(script: 'git tag --points-at HEAD | head -n 1', returnStdout: true).trim()
// Retrieve default tag
String defaultTag = sh(returnStdout: true, script: 'git describe --always').trim()
container.buildAndPublishImage([
kubecontainer.buildAndPublishImage([
'imageName': 'reg.cadoles.com/pcaseiro/myapplication-standalone',
// Use current tag or default tag if not defined
'imageTag': defaultTag,
'dockerfile': './misc/images/myapplication-standalone/Dockerfile',
'dryRun': false
])
container.buildAndPublishImage([
'imageName': 'reg.cadoles.com/pcaseiro/myapplication-kube',
// Use current tag or default tag if not defined
'imageTag': defaultTag,
'dockerfile': './misc/images/myapplication-kube/Dockerfile',
'dryRun': false
])
}
}
]

View File

@ -1,12 +1,12 @@
################################
# Makefile for Cadoles SP
################################
IMAGE_REPO ?= reg.cadoles.com/cadoles
IMAGE_VERSION ?= 0.0.1
DAY_SUFFIX_TAG ?= $(shell date +%Y%m%d)
##################################################
# Makefile for Cadoles Kubernetes Skeletor project
##################################################
COMMIT_ID ?= $(shell git rev-parse --short --verify HEAD)
CURRENT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD | tr -c '[:alnum:]\n\r' '_'| tr '[:upper:]' '[:lower:]')
IMAGE_REPO ?= reg.cadoles.com/cadoles
IMAGE_VERSION ?= 0.0.1-$(CURRENT_BRANCH)
include main.mk

View File

@ -73,10 +73,11 @@ init_app() {
return 2
fi
git clone --branch "feat/automation" ${SKELL_GIT_URL} ${appDest}
git clone ${SKELL_GIT_URL} ${appDest}
cd ${appDest}
rm -rf .git
rm -rf init-app
echo "Setting Dockerfiles"
dirs=$(find ${DOCKERFILES_ROOT}/* -type d -name 'myapplication-*')

View File

@ -30,8 +30,8 @@ endef
define release_image
docker tag $(IMAGE_REPO)/$1:$(IMAGE_VERSION) $(IMAGE_REPO)/$1:$(IMAGE_VERSION)-$(COMMIT_ID) ; \
docker tag $(IMAGE_REPO)/$1:$(IMAGE_VERSION) $(IMAGE_REPO)/$1:$(IMAGE_VERSION); \
docker tag $(IMAGE_REPO)/$1:$(IMAGE_VERSION) $(IMAGE_REPO)/$1:latest ; \
docker push $(IMAGE_REPO)/$1:latest ; \
docker tag $(IMAGE_REPO)/$1:$(IMAGE_VERSION) $(IMAGE_REPO)/$1:$(IMAGE_VERSION)-latest; \
docker push $(IMAGE_REPO)/$1:$(IMAGE_VERSION)-latest ; \
docker push $(IMAGE_REPO)/$1:$(IMAGE_VERSION) ; \
docker push $(IMAGE_REPO)/$1:$(IMAGE_VERSION)-$(COMMIT_ID)
endef

View File

@ -40,15 +40,15 @@ spec:
name: myapplication-nginx
args: ["/usr/sbin/nginx"]
env:
- name: NGINX_myapplication_UPSTREAM_BACKEND_SERVER
- name: NGINX_APP_UPSTREAM_BACKEND_SERVER
value: 127.0.0.1:9000
- name: NGINX_myapplication_ROOT
- name: NGINX_APP_ROOT
value: "/public"
- name: NGINX_myapplication_PHP_INDEX
- name: NGINX_APP_PHP_INDEX
value: "/index.php"
- name: NGINX_ERROR_LOG_LEVEL
value: "warn"
- name: NGINX_myapplication_PHP_NON_FILE_PATTERN
- name: NGINX_APP_PHP_NON_FILE_PATTERN
value: "^/index\\.php(/|$)"
ports:
- containerPort: 8080

View File

@ -18,4 +18,4 @@ spec:
service:
name: myapplication
port:
number: 8080
number: 80