Skip to content

Commit a0672ba

Browse files
authored
Merge pull request #85 from sineverba/refactor-semaphore
Refactor Semaphore
2 parents 303ad53 + 9f26893 commit a0672ba

File tree

5 files changed

+31
-25
lines changed

5 files changed

+31
-25
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ name: Build and deploy Pipeline
44
agent:
55
machine:
66
type: e1-standard-2
7-
os_image: ubuntu1804
7+
os_image: ubuntu2004
88
execution_time_limit:
99
hours: 3
1010

1111
global_job_config:
12+
secrets:
13+
- name: ACCESS_TOKENS
1214

1315
prologue:
1416
commands:
@@ -34,6 +36,4 @@ blocks:
3436
- docker buildx version
3537
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
3638
- docker buildx create --name mybuilder && docker buildx use mybuilder && docker buildx inspect --bootstrap
37-
- docker buildx build --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7 --tag $DOCKER_USERNAME/$DOCKER_IMAGE:$SEMAPHORE_GIT_TAG_NAME --tag $DOCKER_USERNAME/$DOCKER_IMAGE:latest --push .
38-
secrets:
39-
- name: DOCKER_TOKEN
39+
- docker buildx build --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7 --tag $DOCKER_USERNAME/$DOCKER_IMAGE:$SEMAPHORE_GIT_TAG_NAME --tag $DOCKER_USERNAME/$DOCKER_IMAGE:latest --push .

.semaphore/semaphore.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
version: v1.0
22

3-
name: Build and test Pipeline
3+
name: Test
44
agent:
55
machine:
66
type: e1-standard-2
7-
os_image: ubuntu1804
7+
os_image: ubuntu2004
88

99
global_job_config:
10+
secrets:
11+
- name: ACCESS_TOKENS
1012

1113
prologue:
1214
commands:
@@ -19,12 +21,12 @@ global_job_config:
1921
value: php74xc
2022

2123
blocks:
22-
- name: 'Build and test'
24+
- name: "Test"
2325
skip:
2426
when: "tag =~ '.*'"
2527
task:
2628
jobs:
27-
- name: 'Build and test'
29+
- name: "Build and test"
2830
commands:
2931
- checkout
3032
- docker build --tag $DOCKER_USERNAME/$DOCKER_IMAGE .
@@ -36,11 +38,9 @@ blocks:
3638
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE /usr/bin/composer -V | grep "1.10.22"
3739
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -i | grep "short_open_tag => Off => Off"
3840
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -i | grep "memory_limit => 512M => 512M"
39-
secrets:
40-
- name: DOCKER_TOKEN
4141

4242
promotions:
4343
- name: Deploy
44-
pipeline_file: deploy.yml
44+
pipeline_file: build-deploy.yml
4545
auto_promote:
4646
when: "result = 'passed' and tag =~ '.*'"

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# 1.5.0
1+
# Next version
2+
+ Refactor Semaphore
3+
4+
## 1.5.0
25
+ Upgrade PHP to 7.4.22
36

47
## 1.4.0

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2020 sineverba
3+
Copyright (c) 2020 - 2022 sineverba
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1+
IMAGE_NAME=sineverba/testphp74xc
2+
CONTAINER_NAME=testphp74xc
3+
14
build:
2-
docker build --tag sineverba/testphp74xc .
5+
docker build --tag $(IMAGE_NAME) .
36

47
multiple:
5-
docker buildx build --tag sineverba/testphp74xc --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7 --push .
8+
docker buildx build --tag $(IMAGE_NAME) --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7 --push .
69

710
test:
8-
@docker run --rm sineverba/testphp74xc php -v | grep 7.4.22
9-
@docker run --rm sineverba/testphp74xc php -v | grep OPcache
10-
@docker run --rm sineverba/testphp74xc php -m | grep xdebug
11-
@docker run --rm sineverba/testphp74xc php -r "xdebug_info();" | grep "3.0.4"
12-
@docker run --rm sineverba/testphp74xc php -m | grep pdo_pgsql
13-
@docker run --rm sineverba/testphp74xc php -m | grep zip
14-
@docker run --rm sineverba/testphp74xc /usr/bin/composer -V | grep "1.10.22"
15-
@docker run --rm sineverba/testphp74xc php -i | grep "short_open_tag => Off => Off"
16-
@docker run --rm sineverba/testphp74xc php -i | grep "memory_limit => 512M => 512M"
11+
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME) php -v | grep 7.4.22
12+
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME) php -v | grep OPcache
13+
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME) php -m | grep xdebug
14+
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME) php -r "xdebug_info();" | grep "3.0.4"
15+
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME) php -m | grep pdo_pgsql
16+
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME) php -m | grep zip
17+
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME) /usr/bin/composer -V | grep "1.10.22"
18+
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME) php -i | grep "short_open_tag => Off => Off"
19+
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME) php -i | grep "memory_limit => 512M => 512M"
1720

1821
destroy:
19-
docker image rm sineverba/testphp74xc
22+
docker image rm $(IMAGE_NAME)

0 commit comments

Comments
 (0)