This repository was archived by the owner on Feb 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +72
-0
lines changed Expand file tree Collapse file tree 2 files changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : 2.1
2
+ executors :
3
+ docker-publisher :
4
+ environment :
5
+ IMAGE_NAME : islamicnetwork/k8s-deployment
6
+ docker :
7
+ - image : circleci/buildpack-deps:stretch
8
+ php74 :
9
+ docker :
10
+ - image : islamicnetwork/php74
11
+ working_directory : ~/repo
12
+
13
+ jobs :
14
+ tag :
15
+ docker :
16
+ - image : cibuilds/github
17
+ working_directory : ~/repo
18
+ steps :
19
+ - checkout
20
+ - run :
21
+ name : " Publish Release on GitHub"
22
+ command : |
23
+ VERSION="${CIRCLE_BUILD_NUM}"
24
+ ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ~/repo/
25
+ build :
26
+ executor : docker-publisher
27
+ steps :
28
+ - checkout
29
+ - setup_remote_docker
30
+ - run :
31
+ name : Add Version information
32
+ command : |
33
+ echo "commit: ${CIRCLE_SHA1}" > html/VERSION
34
+ echo "tag: ${CIRCLE_TAG}" >> html/VERSION
35
+ echo "branch: ${CIRCLE_BRANCH}" >> html/VERSION
36
+ echo "ci_build: ${CIRCLE_BUILD_NUM}" >> html/VERSION
37
+ echo "ci_workflow: ${CIRCLE_WORKFLOW_ID}" >> html/VERSION
38
+ - run :
39
+ name : Build Production Docker image
40
+ command : docker build -t $IMAGE_NAME:build .
41
+ - run :
42
+ name : Publish Docker Image to Docker Hub
43
+ command : |
44
+ echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
45
+ IMAGE_TAG="${CIRCLE_BUILD_NUM}"
46
+ docker tag $IMAGE_NAME:build $IMAGE_NAME:$CIRCLE_TAG
47
+ docker push $IMAGE_NAME:$CIRCLE_TAG
48
+
49
+ workflows :
50
+ version : 2
51
+ build-master :
52
+ jobs :
53
+ - tag :
54
+ context : org-global
55
+ filters :
56
+ branches :
57
+ only : master
58
+ tags :
59
+ ignore : /.*/
60
+ - build :
61
+ context : org-global
62
+ filters :
63
+ tags :
64
+ only : /.*/
65
+ branches :
66
+ ignore : /.*/
Original file line number Diff line number Diff line change
1
+ FROM islamicnetwork/php74:latest
2
+
3
+ ARG VERSION
4
+
5
+ RUN echo "Version number: $VERSION" > /var/www/html/index.php
6
+
You can’t perform that action at this time.
0 commit comments