mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
build: use https to get source code
This commit is contained in:
parent
f78f9a5ba0
commit
b9800c63e9
@ -2,6 +2,11 @@
|
|||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
aliases:
|
aliases:
|
||||||
|
- &get-code
|
||||||
|
run:
|
||||||
|
name: Get code
|
||||||
|
command: |
|
||||||
|
git clone -b $CIRCLE_BRANCH https://github.com/ansible-semaphore/semaphore.git ./
|
||||||
|
|
||||||
- &golang-image
|
- &golang-image
|
||||||
image: circleci/golang:1.13
|
image: circleci/golang:1.13
|
||||||
@ -85,7 +90,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- *install-node
|
- *install-node
|
||||||
- *install-task-binary
|
- *install-task-binary
|
||||||
- checkout
|
- *get-code
|
||||||
- *load-go-cache
|
- *load-go-cache
|
||||||
- *load-npm-cache
|
- *load-npm-cache
|
||||||
- run: task deps
|
- run: task deps
|
||||||
@ -105,7 +110,7 @@ jobs:
|
|||||||
- *install-node
|
- *install-node
|
||||||
- *install-task-binary
|
- *install-task-binary
|
||||||
- run: sudo apk add rpm
|
- run: sudo apk add rpm
|
||||||
- checkout
|
- *get-code
|
||||||
- *load-go-cache
|
- *load-go-cache
|
||||||
- *load-npm-cache
|
- *load-npm-cache
|
||||||
- run: task deps
|
- run: task deps
|
||||||
@ -120,7 +125,7 @@ jobs:
|
|||||||
- *golang-image
|
- *golang-image
|
||||||
working_directory: *working-dir
|
working_directory: *working-dir
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- *get-code
|
||||||
- *install-node
|
- *install-node
|
||||||
- *install-task-binary
|
- *install-task-binary
|
||||||
- run: task deps:integration
|
- run: task deps:integration
|
||||||
@ -140,7 +145,7 @@ jobs:
|
|||||||
- *install-task-binary
|
- *install-task-binary
|
||||||
# Needed only in ci to post coverage reports
|
# Needed only in ci to post coverage reports
|
||||||
- run: go get github.com/schrej/godacov
|
- run: go get github.com/schrej/godacov
|
||||||
- checkout
|
- *get-code
|
||||||
- *load-go-cache
|
- *load-go-cache
|
||||||
- run: task deps:tools
|
- run: task deps:tools
|
||||||
- run: task deps:be
|
- run: task deps:be
|
||||||
@ -156,7 +161,7 @@ jobs:
|
|||||||
test:integration:
|
test:integration:
|
||||||
machine: true
|
machine: true
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- *get-code
|
||||||
- *install-task-binary
|
- *install-task-binary
|
||||||
- run: context=ci task dc:up
|
- run: context=ci task dc:up
|
||||||
|
|
||||||
@ -184,7 +189,7 @@ jobs:
|
|||||||
- *golang-image
|
- *golang-image
|
||||||
steps:
|
steps:
|
||||||
- *install-task-binary
|
- *install-task-binary
|
||||||
- checkout
|
- *get-code
|
||||||
- setup_remote_docker
|
- setup_remote_docker
|
||||||
- run: context=prod task docker:test
|
- run: context=prod task docker:test
|
||||||
|
|
||||||
@ -193,7 +198,7 @@ jobs:
|
|||||||
- *golang-image
|
- *golang-image
|
||||||
steps:
|
steps:
|
||||||
- *install-task-binary
|
- *install-task-binary
|
||||||
- checkout
|
- *get-code
|
||||||
- setup_remote_docker
|
- setup_remote_docker
|
||||||
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||||
- run: context=prod tag=develop task docker:build
|
- run: context=prod tag=develop task docker:build
|
||||||
@ -204,7 +209,7 @@ jobs:
|
|||||||
- *golang-image
|
- *golang-image
|
||||||
steps:
|
steps:
|
||||||
- *install-task-binary
|
- *install-task-binary
|
||||||
- checkout
|
- *get-code
|
||||||
- setup_remote_docker
|
- setup_remote_docker
|
||||||
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||||
- run: context=prod tag=latest task docker:build
|
- run: context=prod tag=latest task docker:build
|
||||||
@ -224,7 +229,7 @@ jobs:
|
|||||||
- *install-node
|
- *install-node
|
||||||
- *install-task-binary
|
- *install-task-binary
|
||||||
- run: sudo apt-get install rpm
|
- run: sudo apt-get install rpm
|
||||||
- checkout
|
- *get-code
|
||||||
- *load-go-cache
|
- *load-go-cache
|
||||||
- *load-npm-cache
|
- *load-npm-cache
|
||||||
- run: task deps
|
- run: task deps
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
## Project not maintained
|
|
||||||
|
|
||||||
Hello community, this project is no longer maintained. If there is a good maintained fork, let us know we'll point it out here.
|
|
||||||
|
|
||||||
![semaphore](web/public/img/logo.png)
|
![semaphore](web/public/img/logo.png)
|
||||||
|
|
||||||
[![Circle CI](https://circleci.com/gh/ansible-semaphore/semaphore.svg?style=svg&circle-token=3702872acf2bec629017fa7dd99fdbea56aef7df)](https://circleci.com/gh/ansible-semaphore/semaphore)
|
[![Circle CI](https://circleci.com/gh/ansible-semaphore/semaphore.svg?style=svg&circle-token=3702872acf2bec629017fa7dd99fdbea56aef7df)](https://circleci.com/gh/ansible-semaphore/semaphore)
|
||||||
|
@ -96,8 +96,8 @@ tasks:
|
|||||||
- db/db-packr.go
|
- db/db-packr.go
|
||||||
- api/api-packr.go
|
- api/api-packr.go
|
||||||
cmds:
|
cmds:
|
||||||
- packr
|
|
||||||
- go run util/version_gen/generator.go {{ if .TAG }}{{ .TAG }}{{ else }}{{ if .SEMAPHORE_VERSION }}{{ .SEMAPHORE_VERSION }}{{ else }}{{ .BRANCH }}-{{ .SHA }}-{{ .TIMESTAMP }}{{ if .DIRTY }}-dirty{{ end }}{{ end }}{{end}}
|
- go run util/version_gen/generator.go {{ if .TAG }}{{ .TAG }}{{ else }}{{ if .SEMAPHORE_VERSION }}{{ .SEMAPHORE_VERSION }}{{ else }}{{ .BRANCH }}-{{ .SHA }}-{{ .TIMESTAMP }}{{ if .DIRTY }}-dirty{{ end }}{{ end }}{{end}}
|
||||||
|
- packr
|
||||||
vars:
|
vars:
|
||||||
TAG:
|
TAG:
|
||||||
sh: git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed -n 's/^\([^^~]\{1,\}\)\(\^0\)\{0,1\}$/\1/p'
|
sh: git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed -n 's/^\([^^~]\{1,\}\)\(\^0\)\{0,1\}$/\1/p'
|
||||||
|
@ -5,12 +5,12 @@ ENV SEMAPHORE_VERSION="development" SEMAPHORE_ARCH="linux_amd64" \
|
|||||||
APP_ROOT="/go/src/github.com/ansible-semaphore/semaphore/"
|
APP_ROOT="/go/src/github.com/ansible-semaphore/semaphore/"
|
||||||
|
|
||||||
# hadolint ignore=DL3013
|
# hadolint ignore=DL3013
|
||||||
RUN apk add --no-cache git mysql-client python py-pip py-openssl openssl ca-certificates curl curl-dev openssh-client tini nodejs nodejs-npm bash rsync && \
|
RUN apk add --no-cache git mysql-client python3 py3-pip py-openssl openssl ca-certificates curl curl-dev openssh-client tini nodejs nodejs-npm bash rsync && \
|
||||||
apk --update add --virtual build-dependencies python-dev libffi-dev openssl-dev build-base &&\
|
apk --update add --virtual build-dependencies python3-dev libffi-dev openssl-dev build-base &&\
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
RUN pip install --upgrade pip cffi && \
|
RUN pip3 install --upgrade pip cffi && \
|
||||||
pip install ansible &&\
|
pip3 install ansible &&\
|
||||||
apk del build-dependencies
|
apk del build-dependencies
|
||||||
|
|
||||||
RUN adduser -D -u 1002 -g 0 semaphore && \
|
RUN adduser -D -u 1002 -g 0 semaphore && \
|
||||||
|
@ -3,7 +3,8 @@ FROM apiaryio/dredd:13.0.0
|
|||||||
ENV SEMAPHORE_SERVICE=semaphore_ci \
|
ENV SEMAPHORE_SERVICE=semaphore_ci \
|
||||||
SEMAPHORE_PORT=3000 \
|
SEMAPHORE_PORT=3000 \
|
||||||
MYSQL_SERVICE=mysql \
|
MYSQL_SERVICE=mysql \
|
||||||
MYSQL_PORT=3306
|
MYSQL_PORT=3306 \
|
||||||
|
PATH=/root/go/bin:${PATH}
|
||||||
|
|
||||||
RUN apk add --no-cache bash curl git go
|
RUN apk add --no-cache bash curl git go
|
||||||
|
|
||||||
@ -14,7 +15,10 @@ COPY . /semaphore/
|
|||||||
|
|
||||||
WORKDIR /semaphore
|
WORKDIR /semaphore
|
||||||
|
|
||||||
RUN task deps:tools && task deps:be && task compile:be && task compile:api:hooks
|
RUN task deps:tools
|
||||||
|
RUN task deps:be
|
||||||
|
RUN task compile:be
|
||||||
|
RUN task compile:api:hooks
|
||||||
|
|
||||||
COPY deployment/docker/ci/dredd/entrypoint /usr/local/bin
|
COPY deployment/docker/ci/dredd/entrypoint /usr/local/bin
|
||||||
|
|
||||||
|
@ -5,12 +5,12 @@ ENV SEMAPHORE_VERSION="development" SEMAPHORE_ARCH="linux_amd64" \
|
|||||||
APP_ROOT="/go/src/github.com/ansible-semaphore/semaphore/"
|
APP_ROOT="/go/src/github.com/ansible-semaphore/semaphore/"
|
||||||
|
|
||||||
# hadolint ignore=DL3013
|
# hadolint ignore=DL3013
|
||||||
RUN apk add --no-cache git mysql-client python py-pip py-openssl openssl ca-certificates curl curl-dev openssh-client tini nodejs nodejs-npm bash rsync && \
|
RUN apk add --no-cache git mysql-client python3 py3-pip py-openssl openssl ca-certificates curl curl-dev openssh-client tini nodejs nodejs-npm bash rsync && \
|
||||||
apk --update add --virtual build-dependencies python-dev libffi-dev openssl-dev build-base &&\
|
apk --update add --virtual build-dependencies python3-dev libffi-dev openssl-dev build-base &&\
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
RUN pip install --upgrade pip cffi && \
|
RUN pip3 install --upgrade pip cffi && \
|
||||||
pip install ansible &&\
|
pip3 install ansible &&\
|
||||||
apk del build-dependencies
|
apk del build-dependencies
|
||||||
|
|
||||||
RUN adduser -D -u 1002 -g 0 semaphore && \
|
RUN adduser -D -u 1002 -g 0 semaphore && \
|
||||||
@ -28,7 +28,7 @@ RUN cd $(go env GOPATH) && curl -sL https://taskfile.dev/install.sh | sh
|
|||||||
# Copy in app source
|
# Copy in app source
|
||||||
WORKDIR ${APP_ROOT}
|
WORKDIR ${APP_ROOT}
|
||||||
COPY . ${APP_ROOT}
|
COPY . ${APP_ROOT}
|
||||||
RUN deployment/docker/ci/bin/install
|
RUN deployment/docker/dev/bin/install
|
||||||
|
|
||||||
USER semaphore
|
USER semaphore
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
Loading…
Reference in New Issue
Block a user